WO2021002060A1 - 制御システム、サポート装置および設定プログラム - Google Patents

制御システム、サポート装置および設定プログラム Download PDF

Info

Publication number
WO2021002060A1
WO2021002060A1 PCT/JP2020/010349 JP2020010349W WO2021002060A1 WO 2021002060 A1 WO2021002060 A1 WO 2021002060A1 JP 2020010349 W JP2020010349 W JP 2020010349W WO 2021002060 A1 WO2021002060 A1 WO 2021002060A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
upg
program
control command
upg69
Prior art date
Application number
PCT/JP2020/010349
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 US17/622,616 priority Critical patent/US20220357715A1/en
Priority to EP20834364.0A priority patent/EP3995911A4/en
Priority to CN202080046811.9A priority patent/CN114072739A/zh
Publication of WO2021002060A1 publication Critical patent/WO2021002060A1/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/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/052Linking several PLC's
    • 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/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/41835Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by programme execution
    • 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/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13063Synchronization between modules

Definitions

  • This disclosure relates to a control system, a support device, and a setting program for controlling an object.
  • FA Vectory Automation
  • PLCs programmable logic controllers
  • the PLC gives a control command to the controlled object by operating (executing) a control program of the controlled object such as a field device including a robot.
  • a control program of the controlled object such as a field device including a robot.
  • FA systems are configured to include a plurality of PLCs connected to a network.
  • Patent Document 1 discloses a programmable controller that performs cyclic communication with another programmable controller via a communication device.
  • the present disclosure is to provide a control system, a support device, and a setting program that can meet the above needs.
  • the control system is a control system including a plurality of control devices connected to a network, and stores a control program having an instruction for calculating and updating a control command which is a value related to control of a controlled object. It has a program storage means provided in each control device, an operation means provided in each control device to operate a control program of the program storage means of the control device, and an instruction to calculate and update the same control command.
  • a plurality of control programs are arranged in one or more of a plurality of control devices, and the same control command updates are operated among the plurality of control programs so as not to conflict with each other. It is provided with a mediation means for mediating time.
  • control programs for calculating and updating a control command for the same control target are arranged in one or more of a plurality of control devices, they are the same among the plurality of control programs.
  • the operating time is automatically arbitrated among multiple control programs so that the update of the control command of is not conflicted with each other. Therefore, the user can freely arrange the control program among the plurality of PLCs without being aware of the conflict.
  • the arbitration means statically determines the operating time of a plurality of control programs so that updates of the same control command do not conflict with each other among the plurality of control programs.
  • the operating times of a plurality of control programs can be statically determined so as to eliminate conflicts.
  • the arbitration means disperses and arranges a plurality of control programs in a plurality of control devices, and operates the plurality of control programs in order according to the progress of the process. To arbitrate.
  • the operating time when determining the operating time of a plurality of control programs so as to eliminate conflict, the operating time can be determined according to the progress of the process.
  • control command includes the control command given to the control target
  • arbitration means further generates identification information for the control target to identify the control command addressed to itself.
  • the identification information for the control target to identify the control command addressed to itself includes the identifier of the control program that updated the control command for the control target.
  • the controlled object it becomes possible for the controlled object to use the identifier of the control program in order to identify the control command addressed to itself.
  • the identification information for the control target to identify the control command addressed to itself is given to the control target when a plurality of control commands are given to the control target. Includes order.
  • the order in which the control commands should be given to the self can be used.
  • the order in which the plurality of control commands are given to the control target is based on the operating time arbitrated among the plurality of control programs that update the plurality of control commands.
  • control commands are given to the control target can be determined based on the operation time arbitrated between the control programs.
  • the control device when the control device operates a plurality of control programs while switching according to the arbitrated operation time by the operating means, the control device notifies the control target of the switching to one control program, and the notification is sent after the switching. Includes identification information for identifying the control command updated by the control program of 1.
  • the control device when the control program to be operated is switched, the control device outputs a notification of the switching, and uses this notification to identify the control command updated by the control program after the switching to the control target. Identification information can be provided.
  • the identification information includes the type of control command.
  • the identification information that can be provided to the control target can include the type corresponding to the control command given to the control target, for example, the type of the variable.
  • control-related values include the values of variables that the control program updates during operation.
  • control-related values include the values of variables that are updated during the operation of the control program, such as the state value of the controlled object, the control command, the command value, etc. shared between the control programs.
  • the support device is a support device that can be connected to a control system including a plurality of control devices connected to a network, and each control device calculates and updates a control command that is a value related to control of a controlled object.
  • the support device includes a program storage means for storing a control program having an instruction and an operation means for operating a control program of the program storage means of the control device, and the support device calculates and updates the same control command.
  • each control program can be used.
  • the operating time is automatically arbitrated between multiple control programs so that control command updates do not conflict with each other. Therefore, the user can freely arrange the control program among the plurality of control devices without being aware of the conflict.
  • the setting program is a setting program for setting the behavior of a control system including a plurality of control devices connected to a network, and each control device calculates a control command which is a value related to control of a controlled object.
  • a program storage means for storing a control program having an instruction to be updated and an operation means for operating a control program of the program storage means of the control device are provided, and the setting program gives the computer the same control command.
  • a step of arranging the operation time among a plurality of control programs is executed.
  • the control command from each control program is provided.
  • the operating time is automatically arbitrated between multiple control programs so that they do not conflict with each other. Therefore, the user can freely arrange the control program among the plurality of PLCs without being aware of the conflict.
  • FIG. 7 shows an example of the communication frame 20 for transmitting the notification 31 of the switching of the “variable manager” of the variable management. It is a figure which shows typically an example of the structure of the communication frame 20 which concerns on this embodiment.
  • system 1 applied to FA includes equipment groups 3A, 3B, 3C, and 3D.
  • the device groups 3A, 3B, 3C, and 3D include PLCs 100A, 100B, 100C, and 100D connected to the network 11, respectively, and one or more field devices 90 connected to each PLC.
  • the field device 90 of the device group 3A of FIG. 1 includes the robot controller 90A of the robot 900A of FIG. 2, and the field device 90 of the device group 3B includes the robot controller 90B of the robot 900B of FIG.
  • the field device 90 is an embodiment of the “controlled object”.
  • PLC100A, 100B, 100C and 100D are examples of, for example, a "control device", and each has the same function. Therefore, when these are not distinguished, they are collectively referred to as PLC100.
  • the system 1 can also connect the support device 500 to the network 11.
  • the system 1 may be connected to the management server of the system 1 that communicates with the PLC 100 via the network 11.
  • Each PLC 100 connects one or a plurality of field devices 90 on the field side via the network 11.
  • Each of the field devices 90 is an actuator that exerts some physical action on a manufacturing device, a production line, or the like (hereinafter, also collectively referred to as a “field”), an input / output device that exchanges information with the field, and an input / output device.
  • robot controllers 90A, 90B and the like that control robots 900A and 900B.
  • the types of field devices are not limited to these.
  • two robots 900A and 900B are shown, but the number of robots is not limited to two.
  • the timer 101A of the PLC 100A, the timer 101B of the PLC 100B, the timer 101C of the PLC 100C, and the timer 101D of the PLC 100D are time-synchronized with each other. Further, the PLC 100 and one or more field devices 90 connected to the PLC 100 are time-synchronized with each other. As a result, in the system 1, all the devices are time-synchronized with each other.
  • a unified communication protocol is applied to the network 11 between the PLCs 100 and the network 11 on the field side.
  • TSN Time-Sensitive Networking
  • the communication protocol is compared with the case where the communication protocol between the PLC100 and the communication protocol between the PLC100 and the field device 90 are different. Conversion can be omitted, and communication can be performed at higher speed.
  • the communication time of the TSN is sufficiently shorter than the control cycle of the system 1. Therefore, it is possible to share data among all devices for each control cycle.
  • the PLC 100 executes IO refresh 72 that exchanges data with the field for each control cycle, and executes UPG (User Program) 69, which will be described later, based on the field values collected from the fields.
  • UPG69 is an embodiment of a "control program" having an instruction to calculate and update a control command which is a value related to control of a controlled object.
  • the field values collected from the field may include state values that indicate the controlled state.
  • the PLC 100 executes the control calculation process based on the field value, and transmits the calculated value by the control calculation process to the field device 90. This calculated value corresponds to one embodiment of the "control command" for controlling the field device 90.
  • control command may be a value related to control, and is not limited to a value shared between UPG69s (for example, a value indicating the behavior of the controlled object (state value)) or a value given to the controlled object (for example, For example, command value, control amount, etc.) are included.
  • the PLC 100 executes the IO refresh 72 that collects the field values from the field device 90 and outputs the control command calculated by executing the UPG 69 to the field device 90 for each control cycle.
  • the control calculation process of the UPG 69 and the IO refresh 72 in the PLC 100 are executed within a control cycle, which is a time based on the above-mentioned time synchronization and is shared between the PLC 100 and the field device 90, for example. be able to.
  • the support device 500 provides a support tool that assists the user in operating the system 1.
  • the support tool includes a preparation setting tool such as an execution environment of UPG69 or a communication environment with PLC100.
  • the support tool is provided to the user by, for example, a UI (User Interface).
  • the support device 500 may be connected to the network 11, but may be built into the PLC 100.
  • the robot 900A connected to the PLC 100A and the robot 900B connected to the PLC 100B cooperate with each other and are applied to the machining of the work 912. Specifically, in the machining process, the robot 900A grabs the work 912 on the tray 911 with an arm (pick) and holds the work 912 (support), and the work 912 is held. Is manufactured with a machining kit provided at the tip of the arm of the robot 900B, after which the robot 900A places the work 912 in place (Place).
  • the UPG69 corresponding to each process is executed while switching, and the control command output from each UPG69 is the corresponding control target of the robots 900A and 900B.
  • the process is performed when the robot controllers 90A and 90B are given to the robot controllers 90A and 90B and the robot controllers 90A and 90B operate according to a control command.
  • UPG69 that outputs the control command of "pick”, UPG (2) that outputs the control command of "support”, and UPG (2) that outputs the control command of "machining” are executed by PLC100.
  • UPG (4) that outputs a "place” control command are illustrated.
  • the robot controller 90A that receives the control commands of “pick”, “support”, and “place” is connected to the PLC100A, the communication delay is increased when the communication delay (communication time required) of the control command is taken into consideration.
  • UPG (1), UPG (2) and UPG (4) are fixedly arranged on the PLC100A and executed on the PLC100A, and UPG (3) is fixedly arranged on the PLC100B and executed on the PLC100B. ..
  • the device is within the control cycle (more specifically, within the period of IO refresh 72). Since it is possible to share data between the robots, it is possible to freely arrange the UPG69 that outputs the control command of the robot 900A or 900B to any of the PLC100s without being aware of the communication delay.
  • the setting tool 600 provided by the support device 500 includes an arrangement tool 63 and a schedule generation tool 64 for freely determining the arrangement of UPG69 among PLCs 100.
  • the placement tool 63 determines to place (download) a plurality of control programs (UPG69) for giving control commands to the same control target (robot 900A) to one or more of the plurality of control devices (PLC100). can do.
  • UPG69 a plurality of control programs
  • the placement tool 63 first measures the communication delay time when the UPG (1) is executed in each PLC 100, and determines the PLC 100 having the minimum communication delay time as the load destination of the UPG (1). .. Similarly, for each of the remaining UPGs (2), (3), and (4), the PLC100 to be loaded is determined based on the communication delay time. According to this determination, in FIG. 1, UPG (1) and UPG (2) are arranged on PLC100A, UPG (3) is arranged on PLC100B, and UPG (4) is arranged on PLC100D.
  • a plurality of UPGs (1), UPGs (2), and UPGs (4) for giving control commands to the same control target are not fixed to the PLC100A, but are assigned to the PLC100A according to the communication delay time. It can be arranged at 100D.
  • the standard for placement is not limited to the communication delay time.
  • the schedule generation tool 64 mediates the operation time (execution time) among a plurality of UPG69s so that the update of the control command does not conflict with each other among the UPG69s having the instructions to calculate and update the same control command. This is an example of "arbitration means".
  • the schedule generation tool 64 prevents the update of the control command by each UPG from competing with each other when UPGs (1) to (4), each of which has an instruction to calculate and update the same control command, are executed.
  • the generated UPG schedule 65 is given to each PLC 100.
  • the PLC 100 executes the UPG arranged in itself according to the generated UPG schedule 65. Therefore, even when UPGs (1) to (4) are freely arranged, control commands can be given to the control targets (robot controllers 90A and 90B) while avoiding the above-mentioned conflict.
  • "the update of the same control command conflicts with each other among a plurality of UPG69s” means that the same control command is updated (written) by the plurality of UPG69s at the same time by executing the plurality of UPG69s. ) Means (or is about to be updated).
  • the UPG69 is updated by being executed. It is possible to give a control command to a control target while avoiding interference of the control command.
  • "interference" of control commands means a case where a plurality of control commands of the same type are simultaneously given to the same control target. Therefore, the user can arrange the UPG69 without being aware of the above-mentioned conflict between the UPG69s and the interference between the control commands, and can obtain a high degree of freedom regarding the arrangement of the UPG69.
  • variable manager In the system 1 according to the present embodiment, since the UPG69 can be arranged in an arbitrary PLC100, the variable manager is not the PLC100 but the UPG69 itself. The concept of this variable administrator will be explained.
  • UPG69 is a so-called variable program. That is, the UPG69 can use the input data (field value), output data (control command), internal calculation data, etc. referred to by the program at the time of execution by using input variables, output variables, temporary variables, etc. for each data. It is composed.
  • the variable manager that manages these input variables and output variables is changed from PLC100 to UPG69.
  • the "variable manager" represents an entity having the authority to rewrite the value of the variable.
  • the input variable in which the current position (field value) of the arm of the robot 900A is set and the output variable in which the command value (control command) for changing the position of the arm of the robot 900A is set use the variable.
  • the UPG (1), UPG (2) and UPG (4) for performing the above-mentioned "pick", "support” and “place” can all control the arm of the robot 900A.
  • the input variable in which the current position (field value) of the arm of the robot 900A is set and the output variable in which the command value (control command) for changing the position of the arm of the robot 900A is set Read and write these variables.
  • the control command includes the identifier of the variable manager (UPG69). Therefore, it is possible to determine whether the control target is a control command addressed to itself based on the identifier of the variable manager of the control command.
  • FIG. 3 is a schematic view showing a configuration of a main part of the PLC 100 according to the present embodiment.
  • the PLC 100 includes an arithmetic processing unit 110, a communication circuit 130, a DMA (Direct Memory Access) controller 140, a high-precision timer 160, a communication controller 107, communication ports 136 and 137 for connecting the network 11, and Includes memory card interface 108.
  • DMA Direct Memory Access
  • the arithmetic processing unit 110 includes a processor 112, a storage unit 114, and a storage 119.
  • the PLC 100 includes only one processor 112, but a plurality of processors may be mounted. It should be noted that each processor may have a plurality of cores.
  • the processor 112 periodically executes one or a plurality of tasks. When a plurality of tasks are executed by the arithmetic processing unit 110, different priorities may be set for the plurality of tasks.
  • the processor 112 transfers the communication frame 20 (for example, input data 134, output data 135) described later stored in the buffer 132 described later of the communication circuit 130 to the storage unit 114.
  • the storage unit 114 is configured to include a DRAM (Dynamic Random Access Memory), a SRAM (Static Random Access Memory), or the like, and provides a work area necessary for executing a program on the processor 112.
  • the storage 119 is configured to include a flash memory, a hard disk, or the like, and includes a peripheral processing program 120, a time synchronization program 121 for performing the above time synchronization, an IO refresh program 125, a system program 122, a scheduler 123, or one or more. It stores the UPG library 170 including the UPG 69, the communication program 127, the configuration 126, and the like.
  • Storage 119 is an embodiment of the "program storage means".
  • the system program 122 includes a library such as an OS (Operating System) and a function for executing UPG69 on the processor 112.
  • OS Operating System
  • the IO refresh 72 is executed.
  • the field value (input data) included in the communication frame 20 received via the communication circuit 130 is transmitted to the arithmetic processing unit 110.
  • the IO refresh program 125 transmits a control command (output data) calculated by the PLC 100 to the field device 90. In this way, the IO refresh program 125 realizes the IO refresh 72 that transfers at least one of the input data and the output data.
  • UPG69 is a "control calculation processing" program that is arbitrarily created according to the machine or equipment to be controlled.
  • the UPG69 includes a control calculation program having an instruction for calculating and updating a control command based on the input data 134 of the storage unit 114 for "sequence control" of the control target, and robots 900A, 900B, etc.
  • a motion program having an instruction to calculate and update a control command based on the input data 134 is included.
  • a command value including numerical values such as position, speed, acceleration, and angle is calculated for an actuator such as a servomotor to be controlled.
  • the motion control controls the servomotors associated with the arms of the robots 900A and 900B, and the arms operate according to the control commands.
  • the calculated values such as the control command by the control calculation processing of the UPG69 are stored in the storage unit 114 as the output data 135.
  • the communication program 127 generates the communication frame 20 by using the output data 135 of the storage unit 114, and controls the communication circuit 130 so as to transmit and receive the communication frame 20.
  • the communication program 127 includes an administrator switching program 128 for transmitting an administrator switching notification 31 described later, and a stream processing program 129 for executing stream processing.
  • the peripheral processing program 120 is a process different from the control arithmetic processing executed by the UPG69, and is a process executed around the control arithmetic processing, for example, logging of the communication frame 20 exchanged via the network 11. Including processing and so on.
  • the scheduler 123 is a program that manages resource allocation, execution timing, etc. according to priority for processes or tasks of PLC100. Such processes or tasks include processes or tasks that can be generated by the peripheral processing program 120, UPG69, IO refresh program 125, time synchronization program 121, communication program 127, and the like being executed by the processor 112.
  • the scheduler 123 adjusts the execution timing of each program according to the time-synchronized timer 160, for example, in a cycle based on a predetermined control cycle. Thereby, the PLC 100 can cyclically perform the control calculation process and the IO refresh 72 at a time-based cycle synchronized with the other PLC 100 and with the field device 90.
  • the configuration 126 includes various setting values required for program execution on the PLC 100 and various setting values that define the network configuration.
  • Configuration 126 includes, for example, the UPG schedule 65 generated by support device 500.
  • the communication controller 107 receives the UPG 69 or the UPG schedule 65 via the network 11 or another communication path.
  • the memory card interface 108 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 (user programs, data, etc.) can be read from the memory card 116. There is.
  • the UPG 69 or UPG schedule 65 may be loaded from the memory card 116 into storage 119.
  • the communication circuit 130 connects the communication ports 136 and 137 that physically connect the network 11.
  • the communication port 136 is connected to the network 11 connected to the other PLC100 side
  • the communication port 137 is connected to the network 11 connected to the field device 90 side.
  • the communication circuit 130 exchanges a communication frame 20 with another device via the communication ports 136 and 137.
  • the communication circuit 130 includes a buffer 132 that temporarily stores a communication frame 20 transmitted / received via the network 11.
  • the communication frame 20 temporarily stored in the buffer 132 includes, for example, input data 134 and output data 135.
  • the communication circuit 130 transmits and receives the communication frame 20 as follows, for example.
  • the communication circuit 130 copies the communication frame 20 based on the output data 135 from the storage unit 114 via the DMA controller 140 in accordance with the instruction of the processor 112, stores the copy as the output data 135 in the buffer 132, and also stores the communication frame. 20 is transmitted on the network 11.
  • the communication circuit 130 copies the communication frame 20 arriving (receiving) from the network 11 in accordance with the instruction of the processor 112, stores the copy as input data 134 in the buffer 132, and stores the communication frame 20 in the arithmetic processing unit 110. Output to.
  • the communication frame 20 is stored in the storage unit 114 as input data.
  • the data of the communication frame 20 to be transmitted / received may be stored in the storage unit 114 for a period longer than the control cycle, or only the data of the communication frame 20 of the latest control cycle may be stored in the storage unit 114.
  • the "IO refresh 72" by the PLC 100 includes at least one of transmission of output data 135 (communication frame 20) to another device and reception of input data 134 from the other device.
  • the input data 134 corresponds to the communication frame 20 of the field value collected and transferred by the field device 90
  • the output data 135 is the control command calculated by the control calculation process of the UPG69 of the PLC100.
  • the communication frame 20 corresponds to the communication frame 20.
  • the DMA controller 140 is connected to the arithmetic processing unit 110 and the communication circuit 130, and has a function of speeding up data access between the arithmetic processing unit 110 and the communication circuit 130. This makes it possible to shorten the IO refresh processing time and reduce the jitter of the transmission timing.
  • the configuration is divided into the arithmetic processing unit 110, the communication circuit 130, and the DMA controller 140, but the configuration is not limited to this, and any mounting form can be adopted.
  • it may be configured by a SoC (System on Chip) in which all or a part of the arithmetic processing unit 110 and all or a part of the communication circuit 130 are mounted on the same chip.
  • SoC System on Chip
  • a SoC in which the processor 112 of the arithmetic processing unit 110 and the main functions of the DMA controller 140 are mounted on the same chip may be used.
  • FIG. 4 is a diagram schematically showing a main configuration of a field device 90 according to an embodiment of the present invention.
  • the configuration of FIG. 4 can also be applied to the robot controllers 90A and 90B.
  • the field device 90 has the same configuration as the communication I / F (Interface) 93 for connecting the processor 91, the memory 92, the servomotor, etc., the communication circuit 94 for connecting the network 11, and the timer 160 of the PLC 100.
  • a timer 99 is provided, and a memory card interface 95 to which the memory card 96 is detachably mounted is provided.
  • Such devices may not have the functionality and circuitry to handle the memory card 96. Therefore, the field device 90 may also include devices that do not have the functions and circuits associated with the memory card 96.
  • the communication I / F 93 receives the field value from the control target and transmits the control command from the processor 91 to the control target in accordance with the command from the processor 91. As a result, the controlled object is controlled according to the command value and the controlled variable, and the resulting field value is output.
  • the communication circuit 94 includes communication ports 971 and 972 that physically connect the network 11.
  • the communication circuit 94 exchanges a communication frame 20 with another device via the communication ports 971 and 972.
  • the communication port 971 connects the network 11 connected to the PLC100 side
  • the communication port 972 connects the network 11 connected to the field device 90 side.
  • the communication circuit 94 includes a buffer 941 that temporarily stores the communication frame 20 transmitted / received via the network 11.
  • the communication frame 20 is temporarily stored in the buffer 941 as, for example, input data 944 or output data 943.
  • the memory 92 is configured to include a flash memory, a hard disk, DRAM, SRAM, and the like, and provides a work area necessary for executing a program on the processor 91.
  • the memory 92 includes a system program 81, an application program 82 including a program for operating a control target (servomotor, robot) connected to the field device 90, a communication program 83, and a scheduler for periodically executing the program.
  • a variable management program 85 including stream information 87 or dynamic stream information 870, which will be described later, output data 943, input data 944, and the like are stored.
  • the output data 943 and the input data 944 correspond to the communication frame 20.
  • the memory 92 may store programs or data from the support device 500 via the PLC 100 or from the memory card 96 via the memory card interface 95.
  • the communication program 83 is a program that controls the communication I / F 93 and the communication circuit 94.
  • the communication program 83 includes a time synchronization program 831 for performing time synchronization.
  • the communication circuit 94 copies the communication frame 20 of the output data 943 of the memory 92 in accordance with the instruction of the processor 91, stores the copy as the output data 943 in the buffer 941, and transmits the communication frame 20 on the network 11. .. Further, the communication circuit 94 receives the communication frame 20 arriving from the network 11 according to the instruction of the processor 91, copies the communication frame 20, and stores the copy as input data 944 in the buffer 941. Further, the processor 91 stores the input data 944 of the communication frame 20 in the memory 92.
  • FIG. 5 is a diagram schematically showing the configuration of the support device 500 according to the present embodiment.
  • the support device 500 is a computer system that includes a CPU (Central Processing Unit) 502 and a storage unit that stores programs and data, and operates according to the program.
  • the storage unit includes a ROM (Read Only Memory) 503, a RAM (Random Access Memory) 504, and an HDD (Hard Disk Drive) 505.
  • the support device 500 further includes a communication controller 507 and an I / O (Input / Output) interface 508.
  • the support device 500 further includes a keyboard 509 and a display 510.
  • the keyboard 509 receives an input including an instruction from the user to the support device 500.
  • the support device 500 may include other devices such as a mouse.
  • the display 510 includes an LCD (Liquid Crystal Display) or an organic EL (Electro Luminescence), and displays a video signal or an image according to the video signal output from the support device 500.
  • the support device 500 includes an R / W (reader / writer) device 506 that detachably attaches an external storage medium 501 and reads / writes a program and / or data to the attached storage medium 501.
  • the communication controller 507 controls communication between the support device 500 and the external device via the network 11.
  • the communication controller 507 is configured to include, for example, a NIC (Network Interface Card).
  • the I / O interface 508 controls the exchange of data between the CPU 502 and the keyboard 509 and the display 510.
  • the HDD 505 includes a system program 71 including an OS, a UPG generation program 68 for generating UPG69, one or more generated UPG69, UPG schedule 65, stream information 87, an arrangement program 62 for determining the arrangement of UPG69, and an UPG schedule.
  • a schedule generation program 66 for generating 65 and a stream information generation program 67 for generating stream information 87 are included.
  • the schedule generation program 66 includes a conflict detection program 611 that determines whether or not there is a conflict between variable managers in the UPG schedule 65. This variable administrator conflict will be described later.
  • the UPG generation program 68 includes an editor that edits (generates) UPG69 according to a user operation received from the keyboard 509, a compiler that compiles the edited UPG69, a builder that converts UPG69 into an executable format, and the like. Note that the builder may include a compilation function.
  • FIG. 6 shows an example of a basic communication frame
  • FIG. 7 shows an example of a communication frame 20 for transmitting a notification 31 of switching of the “variable manager” of variable management.
  • the basic communication frame 20 includes an area 21 for storing the preamble, an area for storing the destination 22 of the frame, an area 23 for storing the source of the frame, an area 24 for the tag, and a network type. It includes an area 25 for storing and an area 27 for error correction, and further includes an area for storing a payload 26 which is a data body to be transferred.
  • the destination 22 and the source of the area 23 of the communication frame 20 include information that uniquely identifies each device, for example, a MAC (Media Access Control address).
  • the payload 26 includes, for example, input data 134,944 corresponding to a field value or output data 135,943 corresponding to a control command.
  • the area of the destination 22 includes a stream ID (Identifier) 29 for managing the transfer of the communication frame 20.
  • FIG. 8 is a diagram for explaining the stream ID 29 according to the present embodiment.
  • the communication frame 20 transferred on the network 11 is managed in units of the flow 12.
  • the device connected to the network 11 can be the source (TALKER) or the destination (LISTENER) of the communication frame 20.
  • Each flow 12 is assigned a stream ID defined by a set of a TALKER identifier and a LISTENER identifier.
  • TALKER when the payload 26 is a control command, TALKER is assigned an identifier of UPG69 which is a source of the payload 26 (control command), and LISTENER is assigned to the destination device (field device 90). A MAC address is assigned.
  • TALKER when the payload 26 is a field value, TALKER is assigned the MAC address of the source device, and LISTENER is assigned the MAC address of the destination device. Therefore, each device can uniquely identify each communication frame 20 to be exchanged based on the stream ID 29.
  • control system data can be stored as the payload 26 in the communication frame 20 of FIG.
  • the area of the payload 26 includes an area for storing a field value in the control system data and an area for storing a control command in the control system data.
  • each field device 90 determines the position in the area of the payload 26 based on, for example, an offset individually assigned to the device (for example, an offset from the beginning of the communication frame 20). Specify and read / write data at the specified position. Specifically, the communication program 83 reads and transmits a command value and a control amount (input data 944 or output data 135) from a position based on the offset of the own device in the area of the payload 26 of the incoming communication frame 20. The field value (output data 943 or input data 134) is written at a position based on the offset of the area of the payload 26 of the communication frame 20 to be to be written.
  • the PLC 100 stores the offset information assigned to each field device 90. Therefore, based on this offset information, the PLC 100 reads the field value (output data 943 or input data 134) of each field device 90 from within the area of the payload 26 of the incoming communication frame 20, and also based on this offset information, A control command (input data 944 or output data 135) can be written at an offset position of each field device 90 in the area of the payload 26 of the communication frame 20 to be transmitted.
  • the PLC 100 can read and write the control system data of each field device 90 in the area of the payload 26 of the communication frame 20, and each field device 90 can read and write the control system data of its own device in the area of the payload 26 of the communication frame 20. Can read and write.
  • the MAC address of the device of the source (TALKER) of the notification 31 is stored in the area 23, and the area of the destination 22 is used as the destination (LISTENER) of the notification 31.
  • the multicast address 30 is stored, and in the area of the payload 26, a payload including a notification 31 indicating that the "variable administrator" has been switched is stored.
  • the device (PLC100 or field device 90) connected to the network 11 receives the communication frame 20 storing the notification 31 of FIG. Therefore, it can be detected from the notification 31 that the "variable administrator" has been switched.
  • Support tools > The support tool provided by the support device 500 will be described. First, the process of generating the UPG69 executed in each step and the process of generating the UPG schedule 65 and the stream information 87 will be described.
  • FIG. 9 is a flowchart schematically showing the arbitration process of the setting tool 600 according to the present embodiment.
  • the setting tool 600 includes a step of arranging a plurality of control programs (UPG69) for giving control commands to the same control target (field device 90) on one or more of a plurality of PLCs 100, and each control program.
  • the steps (S1 to S7) of arbitrating the operation time among the plurality of control programs are carried out so that the control commands from the above do not interfere with each other.
  • the step of arranging is described later in FIG.
  • the UPG generation program 68 of the support device 500 accepts the process definition from the user operation via the keyboard 509 (step S1).
  • the definition of the process for example, "Pick”, “Support”, “Place” and “Manufacture” are accepted.
  • 10 and 11 are diagrams illustrating an example of the UPG schedule 65 according to the present embodiment.
  • step S1 as shown in FIG. 10, among the process Pick, Support, Manufacture and Place, the process Pick, Support and Place are assigned to the control target (robot 900A), and the process Manufacture is the control target (robot 900B). ) Is assigned.
  • the schedule generation program 66 is started, and the schedule generation program 66 receives a schedule for executing the process defined in step S1 from the user operation via the keyboard 509 (step S3).
  • the schedule indicates, for example, the execution order of UPG69 (time when each UPG69 is executed, execution timing, etc.).
  • the UPG generation program 68 generates UPG 69 corresponding to each process defined in step S1 from the user operation via the keyboard 509 (step S5). As a result, UPGs (1) to (4) are generated as UPG69 and stored in the HDD 505.
  • the conflict detection program 611 of the schedule generation program 66 determines whether or not the variable manager conflicts between the UPG69 and another UPG69 at the time when each UPG69 is executed based on the schedule received from the user in step S3. (Step S7). That is, the presence or absence of arbitration is determined.
  • step S7 When the conflict detection program 611 determines that the variable manager is in conflict (YES in step S7), the conflict detection program 611 displays information via the display 510 prompting the user to set a schedule for resolving the conflict, and in step S3. Return to. In step S3, the schedule generation program 66 can accept a schedule for resolving the conflict from the user.
  • the schedule generation program 66 When the conflict detection program 611 determines that the variable manager does not conflict (NO in step S7), the schedule generation program 66 generates a conflict-free UPG schedule 65 according to the user operation received in step S3, and streams it.
  • the information generation program 67 generates the stream information 87 of FIG. 11 (step S9).
  • the support device 500 stores the generated UPG schedule 65 and stream information 87 in the HDD 505, or transfers (downloads) them to the PLC 100 and the field device 90.
  • variable manager conflict detection and operation time arbitration when there are two or more variable managers (UPG69) corresponding to one output variable in which a control command (command value) given to the same control target is set, the two or more UPG69s are used. Duplicate operating times (for example, executed at the same time) are called “variable administrator conflicts". In the case of "variable manager conflict", a situation occurs in which a plurality of UPG69s having an instruction to calculate and update the same control command conflict with each other to update the same control command. Therefore, in the present embodiment, by avoiding the "variable manager conflict", it is possible to avoid a situation in which a plurality of UPG 69s conflict with each other to update the same control command.
  • the time during which UPG (4) indicated by the broken line arrow is executed overlaps with the time during which UPG (2) is executed, and the UPG (2) and UPG (4) have different times. There is a "variable administrator conflict" between them.
  • the conflict detection program 611 detects the presence or absence of "variable administrator conflict" from the UPG schedule 65. Specifically, the conflict detection program 611 extracts the output variable name used (declared) in the UPG69 from each UPG69 generated in step S5. Then, it is determined whether or not there are two or more UPG69s that use (declare) a common variable name among the extracted output variable names among the UPG69s generated in step S5. The conflict detection program 611 determines whether or not the times (processes) in which these two or more UPG 69s are executed are the same (overlapping) in the UPG schedule 65. When the conflict detection program 611 determines that the execution times of these two or more UPG69s are the same (overlapping), the conflict detection program 611 detects "variable manager conflict".
  • the schedule generation program 66 in order to prevent "interference" of the control command, when the conflict detection program 611 detects "variable manager conflict” when the schedule generation program 66 generates the UPG schedule 65, Based on the user operation or the like, the schedule generation program 66 generates (changes) the UPG schedule 65 so that the "variable manager conflict” is resolved. For example, the time at which UPG (4) in FIG. 11 is executed is changed from the time at arrow 111A to the time at arrow 111B. In this way, the schedule generation tool 64 (schedule generation program 66) can statically determine the operation time of the plurality of UPG schedules 65 so that the control commands from the UPG schedules 65 do not interfere with each other.
  • the schedule generation tool 64 generates the UPG schedule 65 without "variable manager conflict", so that the PLC 100 generates the UPG.
  • FIG. 12 is a diagram schematically showing an example of the UPG schedule 65 according to the present embodiment.
  • the UPG schedule 65 in FIG. 12 has, for example, information on UPG (1), UPG (2), and UPG (4), and the UPG (1), UPG (2), and UPG (4) are set by control commands.
  • the same output variables (a, b) that are created are used.
  • the UPG schedule 65 corresponds to each UPG69 and has an execution time of 651 corresponding to the order in which the UPG69 operates, an identifier of the UPG69 652, and an output variable 653 used in the UPG69.
  • the UPG schedule 65 has a flag 655 associated with each UPG 69. Flag 655 is set to 0 when the corresponding UPG69 does not operate (does not execute), and is set to 1 during operation (execution).
  • the schedule generation program 66 has a plurality of UPG schedules 65 according to the progress of the process.
  • the operating time of time 651 is arbitrated so that each of the above operates in order.
  • each PLC100 can arbitrate the operation time among the plurality of UPG69s so that the control commands from the respective UPG69s do not interfere with each other.
  • the stream information generation program 67 When the UPG schedule 65 is generated, the stream information generation program 67 generates stream information 87 corresponding to the identification information for the field device 90 to be controlled to identify the control command addressed to itself.
  • FIG. 13 is a diagram schematically showing an example of the stream information 87 according to the present embodiment.
  • the stream information 87 is information extracted from the UPG schedule 65, and is generated corresponding to each of the output variables 653 of the UPG schedule 65.
  • the stream information 87 corresponding to each variable includes a set consisting of a time 871 and a stream ID 872 for each UPG69 for calculating the control command of the variable.
  • Each set includes a time 871 for the UPG69 to operate (execute) and a stream ID 872 for the communication frame 20 of the variable.
  • Time 871 corresponds to time 651 of the UPG schedule 65
  • stream ID 872 corresponds to stream ID 654 of the UPG schedule 65.
  • the stream information 87 is transferred (downloaded, etc.) to the control target (robot controllers 90A, 90B of the robots 900A, 900B).
  • the stream information 87 includes information for determining when, from which UPG69, which variable should be received by the field device 90, time 871, and stream ID 872.
  • Time 871 shows a concept including the order in which the plurality of control commands are given to the field device 90 when the field device 90 is given a plurality of control commands. This order is based on the operating time (time T1-T2, time T2-T3, time T3-T4) arbitrated between the plurality of UPG schedules 65 that output the plurality of control commands.
  • Stream ID 872 includes the identifier of UPG69 and the identifier of the control command.
  • the control command identifier includes the type of control command, which is the value of a variable (more specifically, a variable to which the control command is written) accessed by the UPG69 when the UPG69 is operating. Includes.
  • the field device 90 collates the stream ID 29 of the communication frame 20 received at the time 871 shown in the stream information 87 with the stream ID 872 corresponding to the time 871, and if they do not match, the field device 90 sets the communication frame 20 (That is, the control command) can be discarded. As a result, the field device 90 extracts the communication frame 20 having the control command calculated by the designated UPG 69 at the time specified according to the UPG schedule 65 from the communication frames 20 transmitted on the network 11. It becomes possible. Therefore, in the present embodiment, the UPG 69 is freely arranged in any PLC 100, but even in that case, the field device 90 can surely avoid a malfunction due to "interference" of the control command.
  • FIG. 14 is a flowchart showing an example of the arrangement process of UPG69 according to the present embodiment.
  • FIG. 15 is a diagram showing an example of information 150 regarding UPG69 according to the present embodiment.
  • the information 150 in FIG. 15 has an identifier 151, an execution time 152 required to execute the UPG69, and a variable 153 of the control command output by the UPG69, corresponding to each UPG69 to be arranged.
  • the information 150 is stored in the HDD 150 of the support device 500.
  • FIG. 16 is a diagram showing a field device 90 that operates according to a control command of the variable 153 shown in FIG.
  • each of the variables 153 of UPG69 in FIG. 15 is exemplified as a variable corresponding to a control command given to which field device 90.
  • a plurality of control programs (UPG (1), UPG (2), and UPG (UPG (1), UPG (2)) for giving a control command to the same control target (robot controller 90A) 4)
  • PLC100 the plurality of control devices
  • the placement tool 63 When the placement program 62 is started, the placement tool 63 operates.
  • the placement tool 63 selects the UPG69 (here referred to as UPG-max) corresponding to the identifier 151 having the maximum execution time from the UPG69 of the HDD 505 (step T3).
  • the placement tool 63 selects UPG (3) as UPG-max according to (t1 ⁇ t2 ⁇ t3).
  • the placement tool 63 downloads the selected UPG-max to each PLC100, each PLC100 executes the downloaded UPG-max, calculates (measures) the communication delay time, and supports the calculated communication delay time. It is transmitted to the device 500 (step T5). After calculating the communication delay time, the PLC 100 deletes the downloaded UPG-max.
  • the maximum value of the communication delay time of each variable when UPG-max is downloaded to each PLC100 is calculated.
  • the communication delay time between adjacent devices via the network 11 is set to 1 step.
  • the communication delay times of the variables a3, b3, and c3 calculated by UPG (3) are a3: 3steps, b3: 5steps, and c3: 6steps, respectively, so 6steps are extracted.
  • the communication delay times of the variables a3, b3 and c3 calculated by UPG (3) are a3: 4steps, b3: 4steps and c3: 5steps, respectively, so 5steps are extracted.
  • the communication delay times of the variables a3, b3 and c3 calculated by UPG (3) are a3: 5steps, b3: 3steps and c3: 4steps, respectively, so 5steps are extracted.
  • the communication delay times of the variables a3, b3 and c3 calculated by UPG (3) are a3: 6steps, b3: 4steps and c3: 3steps, respectively, so 6steps are extracted.
  • the placement tool 63 determines the PLC 100 having the smallest maximum value from the communication delay times received from each PLC 100 (steps T7 and T9). According to the above example, the placement tool 63 extracts the PLC100B and the PLC100C. When a plurality of PLC100s are extracted in this way, the placement tool 63 determines, for example, the larger free area of the memory as the download (placement) destination of UPG-max. The placement tool 63 determines, for example, the PLC100B as the download destination for UPG-max.
  • the placement tool 63 downloads UPG-max to the determined PLC100 (step T11). In this way, determining the PLC100 to which the UPG69 is downloaded, or downloading the UPG69 of the determined PLC100 is called a UPG arrangement.
  • the placement tool 63 determines whether or not there is a so-called remaining UPG69 in which the UPG placement has not been performed among the UPG69 indicated by the information 151 of the information 150 (step T13). When the placement tool 63 determines that there is a remaining UPG69 (YES in step T13), the arrangement tool 63 returns to step T3 and performs the processing after step T3 on the remaining UPG69. When the arrangement tool 63 determines that there is no remaining UPG69 (NO in step T13), the arrangement tool 63 ends the process.
  • UPG69 of HDD505 can be downloaded to the optimum PLC100. That is, the PLC 100 having the shortest communication delay time can be arranged in order from the UPG 69 having the longest execution time.
  • the PLC100 to which the UPG69 is downloaded is determined based on the communication delay time, but the method of determining the PLC100 is not limited to the method based on the communication delay time.
  • FIG. 17 is a diagram schematically showing a function included in the field device 90 according to the present embodiment. The functions of FIG. 17 are similarly provided in the robot controllers 90A and 90B.
  • the field device 90 is the data (control command) accessed (read or written) by the application processing unit 901 that executes the application program 82, the scheduling processing unit 902 corresponding to the scheduler 84, and the application program 82. It also includes a variable management processing unit 903 that manages variables (including field values), and a communication basic processing unit 906 for executing a communication program 83 for communication between the field device 90 and an external device according to a communication protocol.
  • the variable management processing unit 903 corresponds to the variable management module 85.
  • the variable management processing unit 903 executes the stream processing program 89.
  • the variable management processing unit 903 detects and receives the stream (communication frame 20) of the control command (variable) addressed to itself based on the stream information 87, and the received variable / stream confirmation processing unit 904 and the measured (detected) field value. Includes a stream generation processing unit 905 that generates a stream (communication frame 20), and a stream information registration unit 910.
  • the stream information registration unit 910 registers (stores) the stream information 87 in the memory 92.
  • the communication basic processing unit 906 corresponding to the communication program 83 includes a transmission processing unit 907 and a reception processing unit 908 for transmitting and receiving a stream (communication frame 20), and a time synchronization processing unit 909 corresponding to the time synchronization program 831.
  • FIG. 18 is a diagram schematically showing the functions included in the PLC 100 according to the present embodiment.
  • the PLC 100 is a communication basic corresponding to the UPG library 170 for storing the downloaded (arranged) UPG 69, the scheduling processing unit 171 corresponding to the scheduler 123, the variable management processing unit 173, and the communication program 127. Includes processing unit 176.
  • the scheduling processing unit 171 adjusts the execution timing so as to periodically execute various application programs including UPG69.
  • the scheduling processing unit 171 includes a UPG scheduling processing unit 172 that adjusts the execution timing so that the UPG 69 of the UPG library 170 is periodically executed according to the UPG schedule 65.
  • the UPG scheduling processing unit 172 includes an administrator switching unit 180 corresponding to the administrator switching program 128. The administrator switching unit 180 executes the process of switching the variable administrator.
  • the variable management processing unit 173 executes the stream processing program 129.
  • the variable management processing unit 173 detects and receives the stream (communication frame 20) addressed to itself based on the stream information 87, and executes the received variable / stream confirmation processing unit 174 and the UPG69 to calculate the stream of the control command.
  • the basic communication processing unit 176 includes a transmission processing unit 177 and a reception processing unit 178 for transmitting and receiving a stream (communication frame 20), and a time synchronization processing unit 179 corresponding to the time synchronization program 121.
  • variable manager modes according to UPG69 of the system 1 include (static fixed), (static fluctuation), and (dynamic fluctuation) modes.
  • the user can specify any one mode by operating the support device 500. Each mode will be described.
  • FIG. 19 is a diagram schematically illustrating a static fixed mode according to an embodiment of the present invention.
  • FIG. 20 is a flowchart showing an example of the static fixed mode processing according to the embodiment of the present invention.
  • the UPG691 calculates the output variable of the arm position of the robot 900A connected to the PLC100A in the order of Pick, Support, and Place in the order of Pick, Support, and Place according to the UPG schedule 65, and the calculated output variable value ( The communication frame 20 of the control command) is generated and transmitted to the robot controller 90A.
  • the UPG692 calculates a control command corresponding to the variable of the arm position of the Manufacture to the robot 900B connected to the PLC 100B in synchronization with the control cycle according to the UPG schedule 65, and transmits the control command to the robot controller 90B of the robot 900B.
  • UPG69 which calculates the control commands for work C and work D, gives the calculated control commands to the robot controllers of the robots connected to the PLCs 100C and 100D, respectively.
  • the schedule generation program 66 executes a process according to the designated static fixed mode.
  • the UPG generation program 68 generates the UPG 69 (for example, UPG (1) to UPG (4)) according to the user operation, and the schedule generation program 66 generates the UPG schedule 65 and the stream information.
  • Stream information 87 is generated by the program 67 (step S10).
  • the conflict detection program 611 is started, and the started conflict detection program 611 determines whether or not there is a conflict between the variable managers based on the UPG schedule 65 (step S13).
  • the conflict detection program 611 does the variable manager of the same output variable in which the control command (command value) indicating the position of the arm of the robot 900A conflicts (UPG (1) or UPG (2))? And a plurality of UPG691 including UPG (4) are executed in parallel) (step S13). Specifically, the conflict detection program 611 determines whether or not the variable manager conflicts with all the variables of the variable 153 of the UPG691 of the information 150. If it is determined that the variable manager conflicts with any of the output variables (NO in step S13), the process proceeds to step S10, and the UPG program 69, the UPG schedule 65, and the stream information 87 are used to avoid the variable manager conflict. Is generated.
  • the conflict detection program 611 determines that there is no conflict between the variable managers for all the output variables (YES in step S13)
  • the conflict detection program 611 downloads the UPG 69 and the UPG schedule 65 to the PLC 100, and includes the stream information 87 including the robot controllers 90A and 90B. It is placed (downloaded) in the field device 90 (step S15).
  • J2. Static fluctuation mode In static variation mode, one variable is rewritten by multiple UPG69s.
  • the method of creating the UPG program 69 according to the static fluctuation mode and generating the UPG schedule 65 and the stream information 87 according to the user operation is the same as the process shown in FIG. 9, so the description will not be repeated.
  • the stream information 87 acquired when the UPG schedule 65 is generated is preset (statically set) in each field device 90 and set. Based on the stream information 87, the field device 90 receives the communication frame 20 that matches the stream ID addressed to itself.
  • each field device 90 does not have the stream information 87 that is statically set. Specifically, while the field device 90 is operating in the PLC 100 according to the UPG schedule 65, the administrator switching unit 180 moves according to the switching of the UPG 69 by the UPG scheduling processing unit 172 (that is, the dynamic switching of the variable manager of the variable). The dynamic stream information 870 is acquired based on the administrator switching notification 31 to be output.
  • the above-mentioned “arbitration means” is also provided in the dynamic fluctuation mode, and the "arbitration means" includes a UPG scheduling processing unit 71 including an administrator switching unit 180.
  • FIG. 21 is a diagram schematically illustrating a dynamic fluctuation mode according to an embodiment of the present invention.
  • FIG. 22 is a timing chart of the dynamic fluctuation mode according to the embodiment of the present invention.
  • UPG (1), UPG (2), and UPG (2) and UPG (2) UPG (4) is generated.
  • UPG (3) is generated as UPG69 that outputs (rewrites) the control command corresponding to the variable of the arm position of the Manufacture to the robot 900B connected to the PLC100B.
  • FIG. 22 schematically shows an example of the UPG schedule 65 generated for the system 1 of FIG. 21 and the stream information 87 transmitted to the field device 90 while the UPG 69 is in operation.
  • an execution instruction 211 for executing the next-order UPG 69 is generated (step (1) in FIG. 22).
  • the execution instruction 211 includes the identifier 652 of the next-order UPG69 and the execution start time 221 of the next-order UPG69.
  • the "next-order UPG" indicates the UPG to be executed next when the execution of a certain UPG is completed.
  • next-order UPG69 When the next-order UPG69 is in the UPG library 170 in its own PLC100, the PLC100 executes the next-order UPG69 according to the execution instruction 211 when the timer 160 clocks the execution start time 221 (step (2) in FIG. 22). )).
  • the PLC100 When the next-order UPG69 is not in the UPG library 170 in the own PLC100, that is, when the next-order UPG69 has another PLC100, the PLC100 notifies the other PLC100 of the execution instruction 211 by, for example, a multicast address.
  • the execution start time 221 is clocked according to the received execution instruction 211, the next-order UPG 69 in the UPG library 170 of the own PLC 100 is executed (step (3) in FIG. 22).
  • the next-order UPG69 that should be executed after waiting for the completion of execution of the plurality of related UPG69s is executed when the execution of the plurality of related UPG69s is completed.
  • the PLC 100 receives the execution instruction 211 corresponding to all the related UPG69s, and then executes the next-order UPG69 according to the received execution instruction 211 (step (4) in FIG. 22).
  • the time for starting execution of the next-order UPG 69 corresponds to the latest time among the execution start times 221 specified by each received execution instruction 211.
  • the PLC100 When the PLC100 switches the UPG69 to be executed to the next-ranked UPG69, the PLC100 transmits the administrator switching notification 31 on the network 11 by multicast. Further, when transmitting the notification 31, the PLC 100 has stream information 87 for identifying the communication frame 20 having a control command output by 1 UPG69 (next-order UPG69) after switching, and a stream having the stream ID 29. Information on the time to start receiving (communication frame 20) is transmitted to the field device 90. When the field device 90 (including the robot controllers 90A and 90B) receives the notification 31, the field device 90 receives the stream information 87 received from the PLC 100, and the stream information is selected from the communication frames 20 transmitted on the network 11 after switching. Based on this, the communication frame 20 having the control command addressed to itself can be selectively received.
  • FIG. 23 is a flowchart schematically showing the processing of the support tool for the dynamic fluctuation mode according to the present embodiment.
  • step S9 of FIG. 9 is changed to step S9a. Since the other processes in FIG. 23 are the same as those in FIG. 9, the description will not be repeated.
  • step S9a the UPG 69 generated in steps S1 to S7 and the statically set UPG schedule 65 are downloaded to the PLC 100 (step S9a).
  • FIG. 24 is a flowchart showing an example of processing before UPG execution in the dynamic fluctuation mode according to the present embodiment.
  • each PLC100 receives the UPG69 and the UPG schedule 65 determined by the placement tool 63 (step S20) before the UPG69 is executed in the system 1, for example, at the time of starting the system 1.
  • the UPG 69 is stored in the UPG library 170, and the UPG schedule 65 is stored in the storage 119 (steps S21 and S22).
  • FIG. 25 is a flowchart showing an example of processing at the start of UPG execution in the dynamic fluctuation mode according to the present embodiment.
  • the PLC 100 determines whether or not the initial execution UPG 69 is registered in the UPG schedule 65 (step S23). Specifically, the arithmetic processing unit 110 searches the UPG schedule 65 for the UPG 69 to be executed first based on the initial execution UPG flag. When the arithmetic processing unit 110 determines by the search that the UPG 69 to be executed first is not registered in the UPG schedule 65 (NO in step S23), the arithmetic processing unit 110 ends the process of FIG. 25.
  • the execution interval of UPG69 is an interval corresponding to a predetermined cycle synchronized with the control cycle.
  • the UPG scheduling processing unit 172 generates an execution instruction 211 for starting the execution of the initial execution UPG 69 at the execution start time 221 calculated in step S27 (step S29), and the generated execution instruction 211 is generated by the scheduling processing unit 171. Register in (step S31).
  • the administrator switching unit 180 generates a communication frame 20 having an administrator switching notification 31 indicating that the UPG69 has been switched to be executed, and transmits it by multicast on the network 11 via the communication basic processing unit 176. (Step S32). As a result, the PLC 100 can notify all the devices of the system 1 that the variable manager has been switched when the initial execution UPG69 is executed. Further, the PLC 100 notifies the field device 90 to be controlled that the communication frame 20 of the specific stream information should be started from the execution start time 221 included in the execution instruction 211.
  • the scheduling processing unit 171 When the scheduling processing unit 171 detects that the timer 160 has timed the execution start time 221 of the registered execution instruction 211, the scheduling processing unit 171 issues an execution instruction to the initial execution UPG69 of the UPG library 170 in order to execute the initial execution UPG69. Notify (step S33).
  • FIG. 26 is a flowchart showing an example of processing during UPG execution according to the present embodiment. A case where the PLC 100 executes the UPG 69 of the UPG library 170 of the own PLC 100 and the execution instruction 211 is output when the execution is completed will be described with reference to FIG. 26.
  • the UPG scheduling processing unit 172 determines whether or not to receive the notification of the completion of execution of UPG69 from the scheduling processing unit 171 (step S35). Step S35 is repeated while the scheduling processing unit 171 determines that the notification of the completion of execution of the UPG69 being executed is not received (NO in step S35). On the other hand, when the scheduling processing unit 171 determines that the notification of execution completion has been received (YES in step S35), the UPG scheduling processing unit 172 searches for the UPG schedule 65, and based on the search result, next to the UPG schedule 65. It is determined whether or not the UPG69 of the rank is registered (step S37).
  • the UPG scheduling processing unit 172 determines that the next-order UPG 69 is not registered in the UPG schedule 65 (NO in step S37), it notifies the user or another PLC 100 of the abnormality (step S57). After that, the process of FIG. 26 ends.
  • the UPG scheduling processing unit 172 determines that the next-order UPG69 is registered in the UPG schedule 65 (YES in step S37), it determines the next-order UPG69 as the UPG69 to be executed (step S39). After that, the scheduling processing unit 171 calculates the execution start time 221 in the same manner as in steps S27 and S29, and generates the execution instruction 211 including the calculated execution start time 221 (steps S41 and S43).
  • the UPG scheduling processing unit 172 determines whether or not the UPG69 (next-ranked UPG69) determined as the execution target exists in the UPG library 170 (step S45). Specifically, the UPG scheduling processing unit 172 searches the UPG library 170 based on the identifier 652 of the UPG 69, and executes the determination based on the search result (step S45). In this case, UPG (2) is searched from the UPG library 170 as the next UPG 69.
  • the UPG scheduling processing unit 172 determines that the next-order UPG (2) following the UPG (1) is in the UPG library 170 in the own PLC 100 (YES in step S45) according to the UPG schedule 65 in FIG. 12, and steps S47. Move to. On the other hand, when the UPG scheduling processing unit 172 determines that the next-order UPG (2) is not in the UPG library 170 in the own PLC100 (NO in step S45), the process proceeds to step S49.
  • the UPG scheduling processing unit 172 registers the execution instruction 211 of the next-order UPG (2) in the scheduling processing unit 171 (step S47), and proceeds to step S49.
  • the scheduling processing unit 171 becomes the next UPG (2) of the UPG library 170. Notify the execution command.
  • step S49 the UPG scheduling processing unit 172 determines whether or not the next-order UPG (2) is present in another PLC100 based on the determination result in step S45 (step S49).
  • step S55 the administrator switching unit 180 generates a communication frame 20 having the administrator switching notification 31 as in step S33, and transmits it to the network 11 by multicast via the communication basic processing unit 176.
  • the UPG scheduling processing unit 172 determines that the next-order UPG (2) is in the UPG library 170 in its own PLC100 (YES in step S45, NO in step S49), the UPG (2) is first transferred to another PLC100.
  • the variable management processing unit 173 When it is determined that there is (YES in step S49) and the above-mentioned administrator switching notification 31 is transmitted (step S50), the variable management processing unit 173 generates a communication frame 20 for storing the stream information 87 (YES in step S49). Step S51), the generated communication frame 20 is transmitted on the network 11 (step S53).
  • FIG. 27 is a flowchart showing an example of processing during UPG execution according to the present embodiment. A case where the PLC 100 receives the execution instruction 211 of the next-order UP G69 from another PLC 100 will be described with reference to FIG. 27.
  • the communication basic processing unit 176 determines whether or not to receive the execution instruction 211 from the external PLC 100 via the network 11 (step S60). When the communication basic processing unit 176 determines that the execution instruction 211 is not received via the network 11 (NO in step S60), the communication basic processing unit 176 repeats step S60.
  • the UPG scheduling processing unit 172 searches the UPG library 170 based on the identifier 652 of the received execution instruction 211. Then, based on the search result, it is determined whether or not the next-ranked UPG 69 is registered in the UPG library 170 (step S63).
  • the execution instruction 211 is not registered (output) in the scheduling processing unit 171 (step S67).
  • the execution instruction 211 is registered in the scheduling processing unit 171 (step S65).
  • the execution instruction 211 indicates the execution instruction 211 only in the PLC100 in which the next-order UPG 69 indicated by the execution instruction 211 is in its own UPG library 170. Therefore, it becomes possible to execute the next-order multicast 69.
  • FIG. 28 is a diagram schematically showing a processing example of variable manager switching in the dynamic fluctuation mode according to the present embodiment.
  • PLCs 100A, 100B and 100C are capable of performing UPG69
  • the UPG library 170 of PLC100A has UPG (1) and UPG (2)
  • the UPG library 170 of PLC100B has UPG (4).
  • the UPG library 170 of PLC100C does not have UPG (4).
  • the execution order of UPG (1) ⁇ UPG (2) ⁇ UPG (4) is specified by the time 651.
  • the UPG (1) In the dynamic fluctuation mode, the UPG (1) outputs a completion notification 220 when the execution is completed in the PLC 100A, and when the UPG scheduling processing unit 172 receives the completion notification 220, the UPG (1) flag 655 of the UPG schedule 65 is set. Set to "0" (step (1)).
  • the scheduling processing unit 171 specifies the next-order UPG (2) according to the UPG schedule UPG schedule 65, and generates the execution instruction 211 of the specified next-order UPG (2).
  • the UPG scheduling processing unit 172 registers the execution instruction 211 in the scheduling processing unit 171 (step (2)).
  • the scheduling processing unit 171 When the execution start time 221 indicated by the registered execution instruction 211 is reached, the scheduling processing unit 171 outputs an execution instruction to UPG (2) next to the UPG library 170 (step (3)).
  • the UPG scheduling processing unit 172 transmits the execution instruction 211 to the network 11 by multicast (step (4)).
  • the PLC100B and the PLC100C receive the execution instruction 211 on the network 11.
  • the PLC100B determines that the UPG (2) (next-order UPG69) corresponding to the identifier 652 of the received execution instruction 211 is in its own UPG library 170. Similar to the PLC100A, the PLC100B sets the corresponding flag 655 to "1" when the execution start time 221 indicated by the received execution instruction 211 is reached, and executes the PLC100B in the UPG (2) next to the UPG library 170. Output the command (step (5)).
  • the PLC 100C receives the execution instruction 211 via the network 11, but does not have the next-order UPG (2) corresponding to the identifier 652 of the execution instruction 211. Therefore, the PLC 100C receives the multicast execution instruction 211. Even if it is received, the operation according to the execution instruction 211 is not performed (step (7)).
  • the administrator switching unit 180 of the PLC 100A After performing step (3) or step (4), the administrator switching unit 180 of the PLC 100A generates a communication frame 20 of the administrator switching notification 31 and transmits it on the network 11 by multicast (step (6)). ).
  • the administrator switching unit 180 networks the administrator switching notification 31. Transmit on the 11 by multicast.
  • the other devices PLC100 and field device 90
  • the UPG69 executed by the other PLC100 PLC100A in FIG. 28
  • the switch has been made to UPG (2)).
  • FIG. 29 is a diagram showing the relationship between the administrator switching notification 31 and the operation of the device according to the present embodiment in a table format.
  • the table of FIG. 29 shows a set consisting of the content of the notification 31 and the information and operation (behavior) that the device (field device 90) has in advance corresponding to each of the first case, the second case, and the third case.
  • the notification 31 of the first case, the second case, and the third case is a stream used for communication of the execution start time 291 of the next-order UPG69 and the data (control command) of the output variable. It has an ID 292.
  • FIG. 30 is a diagram schematically showing another example of the UPG schedule of the present embodiment.
  • the schedule generation program 66 of the support device 500 generates the UPG schedule 65A of FIG. 30 corresponding to the dynamic fluctuation mode according to the user operation.
  • the generated UPG schedule 65A is downloaded to each PLC100.
  • the UPG schedule 65A stores information for each UPG 69.
  • the information of UPG69 includes UPG number 666 corresponding to the execution order of UPG, identifier 652 of UPG69, initial execution flag 667 for designating UPG69 to be executed first according to UPG schedule 65A, pre-UPG number 668, and post-UPG number. Includes 669, output variable 653 and stream ID 654.
  • the pre-UPG number 668 and the post-UPG number 669 indicate the UPG number 666 of the UPG 69 that is executed before and after the corresponding UPG 69, respectively.
  • the first case, the second case, and the third case of FIG. 29 in the dynamic fluctuation mode will be described below.
  • FIG. 31 and 32 are flowcharts showing an outline of processing of the field device 90 according to the (first case) of the dynamic fluctuation mode according to the present embodiment.
  • FIG. 31 shows an outline of the process according to the present embodiment (first case).
  • the stream information registration unit 910 of the field device 90 determines whether or not to receive the administrator switching notification 31 via the communication basic processing unit 906 (step S70).
  • step S70 determines that the notification 31 is not received (NO in step S70)
  • the determination in step S70 is repeated, but when it is determined that the notification 31 has been received (YES in step S70), step S71 is performed. Transition.
  • the stream information registration unit 910 stores the execution start time 291 and the stream ID 292 of the received notification 31 in the memory 92 as the dynamic stream information 870 (step S71).
  • the field device 90 acquires the dynamic stream information 870 by receiving the notification 31 of the administrator switch during execution of the UPG69. be able to.
  • step S73 the communication basic processing unit 906 of the field device 90 determines whether or not to receive the communication frame 20 storing the stream ID 29 (step S73), and determines that the communication frame 20 has not been received (step S73). During NO), the process of step S73 is repeated.
  • the reception variable / stream confirmation processing unit 904 operates the stream ID 29 of the received communication frame 20. It is collated with the stream ID 292 of the target stream information 870, and it is determined whether or not they match (step S75).
  • the reception variable / stream confirmation processing unit 904 determines that the stream ID 29 of the received communication frame 20 does not match the stream ID 292 of the dynamic stream information 870 (NO in step S75), the communication frame 20 is discarded (step S83). ), End the process.
  • the reception variable / stream confirmation processing unit 904 determines that the stream ID 29 of the received communication frame 20 matches the stream ID 292 of the dynamic stream information 870 (YES in step S75)
  • the reception variable / stream confirmation processing unit 904 processes the communication frame 20.
  • the receive variable / stream confirmation processing unit 904 indicates whether the current time measured by the timer 99 indicates the time after the execution start time 291 of the dynamic stream information 870 (that is, the current time is the execution start time 291). (Step S77).
  • the reception variable / stream confirmation processing unit 904 determines that the current time has not passed the execution start time 291 (NO in step S77)
  • the communication frame 20 is used to indicate that the reception is before the execution disclosure time. Notify the PLC100 (step S81).
  • the reception variable / stream confirmation processing unit 904 determines that the current time has passed the execution start time 291 (YES in step S77), it acquires the control command of the payload 26 of the communication frame 20 and inputs the input data 944. Is set to (step S79). As a result, the processor 91 operates the servomotor and the like according to the control command of the input data 944.
  • FIG. 33 is a flowchart showing an outline of processing of the field device 90 according to the present embodiment (second case).
  • FIG. 34 is a diagram showing an example of stream information according to the present embodiment (second case).
  • the stream information 87 was not statically set in the field device 90 (ie, not downloaded prior to the execution of UPG69), whereas in the second case the field device 90 is shown in FIG.
  • the stream ID 872 of the stream information 87 is statically set.
  • the stream information registration unit 910 of the device determines whether or not to receive the administrator switching notification 31 via the communication basic processing unit 906 (step S70), and does not receive the notification 31. When it is determined (NO in step S70), the determination in step S70 is repeated, but when it is determined that the notification 31 has been received (YES in step S70), the process proceeds to step S70a.
  • the stream information registration unit 910 determines whether the stream ID 292 indicated by the received notification 31 matches the statically (preliminarily) set stream ID 872 in FIG. 34 (step S70a). When the stream information registration unit 910 determines the mismatch (NO in step S70a), the stream information registration unit 910 transmits an abnormality notification to the PLC100 of the transmission source of the notification 31 (step S70b).
  • step S71 the notification 31 is sent to the matched stream ID 872 in FIG. 34.
  • the execution time 291 is associated and stored in the memory 92 (step S71).
  • the dynamic stream information 870 (execution time 291 and stream ID 872) is stored in the memory 92.
  • the field device 90 receives the administrator switching notification 31 transmitted from the PLC 100 via the network 11 even when only the stream ID 872 is statically set. Dynamic stream information 870 can be acquired.
  • FIG. 35 is a flowchart showing the processing of the device according to the present embodiment (third case).
  • FIG. 36 is a diagram showing an example of stream information according to the present embodiment (third case).
  • the memory 92 of the field device 90 stores the order 873 corresponding to each of the one or more stream IDs 872 and the one or more stream ID 872 shown in FIG.
  • the order 873 indicates the relative order in which the communication frame 20 of the corresponding stream ID 872 is transferred on the network 11.
  • the stream information registration unit 910 of the device determines whether or not to receive the administrator switching notification 31 via the communication basic processing unit 906 (step S70), and does not receive the notification 31. When it is determined (NO in step S70), the determination in step S70 is repeated, but when it is determined that the notification 31 has been received (YES in step S70), the process proceeds to step S70a.
  • the stream information registration unit 910 determines whether the stream ID 292 indicated by the received notification 31 matches the stream ID 872 in FIG. 34 (step S70a), and if it determines that the stream ID 292 does not match (NO in step S70a), the transmission source of the notification 31 An abnormality notification is transmitted to the PLC 100 (step S70b).
  • step S70c the process proceeds to step S70c.
  • step S70c the stream information registration unit 910 determines whether the order of receiving the stream ID 292 (notification 31) from the PLC 100 is consistent with the order according to the order 873 of FIG. 36 (for example, ascending order). For example, when the receiving order is 1 ⁇ 3 ⁇ 2 in the order 873, the stream information registration unit 910 determines that the receiving order of the stream ID 292 does not match the order according to the order 873 in FIG. (NO in step S70c), the process proceeds to step S70b.
  • step S70c when the stream information registration unit 910 determines that the reception order of the notification 31 (stream ID 292) from the PLC 100 follows the order 873 in FIG. 36 (YES in step S70c), the process proceeds to step S71.
  • step S71 the matching stream ID 872 of FIG. 36 is associated with the execution time 291 of the notification 31 and stored in the memory 92 (step S71).
  • the dynamic stream information 870 (execution time 291 and stream ID 872) is stored in the memory 92.
  • the field device 90 can acquire the dynamic stream information 870 based on the notification 31 received in accordance with the order 873.
  • FIG. 37 is a diagram schematically showing the concept of variable management according to the present embodiment. With reference to FIG. 37, management of variables accessed by UPG69 at run time will be described.
  • the UPG library 170 of the first PLC 100 has UPG (1) and UPG (2)
  • the UPG library 170 of the second PLC 100 has UPG (4).
  • the variable management processing unit 173 of the second PLC 100 manages the local variable (3) of UPG69 as input data 134 or output data 135.
  • the variable data accessed (read / written) by the UPG 69 during execution is managed as input data 134 or output data 135 by the variable management processing unit 173.
  • the variable of the data managed by the variable management processing unit 173 includes a local variable of each UPG69 and a global variable accessible to a plurality of UPG69s.
  • One UPG69 cannot (prohibit) access local variables of another UPG69.
  • One UPG69 can access a global variable if another UPG69 does not access a global variable, but accesses the global variable if another UPG69 is accessing a global variable. It cannot be done (prohibited (5)).
  • UPG (2) cannot access the local variable (1) of UPG (1) (prohibited (4)), and similarly, UPG (1) is the local variable of UPG (2) ( 2) cannot be accessed.
  • variable management processing unit 173 When the variable management processing unit 173 receives an access request for a local variable from UPG69, it accesses the data of the local variable according to the received access request (local variable access (1)). Further, when the variable management processing unit 173 receives the access request for the global variable from the UPG69, the variable management processing unit 173 accesses the data of the global variable according to the received access request when another UPG69 is not executing (global variable access (2)). For example, the variable management processing unit 173 can determine whether or not another UPG69 is being executed based on the flag 655. The access request to the local variable and the global variable from UPG69 is given to the variable management processing unit 173 without going through the scheduling processing unit 172.
  • the variable management processing unit 173 sets the first PLC100 and the second PLC100 each time the global variable is rewritten (written) by the global variable access (2) during the execution of UPG (1) or UPG (2).
  • Global variable synchronization processing (3) is performed between the two. Specifically, in the synchronous processing, the variable management processing unit 173 of the first PLC100 is rewritten so that the value of the global variable of the second PLC100 indicates the value after the rewriting of the global variable of the first PLC100.
  • Send a request is that when the global variable is a variable for which a control command is set, the communication frame 20 of FIG. 6 having the value (control command) of the global variable after rewriting in the payload 26 is networked from the first PLC 100.
  • variable management processing unit 173 of the second PLC 100 writes the value of the payload 26 of the received communication frame 20 into its own global variable.
  • UPG (1), UPG (2) and UPG (4) are loaded (placed) in different PLC100s, the same value after rewriting is set each time the value of the global variable is rewritten (written). It can be referenced (read).
  • the setting tool 600 including the arrangement tool 63 and the schedule generation tool 64 exemplifies the configuration provided by the CPU 502 of the support device 500 of FIG. 5 by executing a program stored in a memory such as the HDD 505.
  • a part or all of the configuration to be performed may be implemented by using a dedicated hardware circuit (for example, ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array)).
  • the main part of the support device 500 may be realized by using hardware that follows a general-purpose architecture. In this case, a virtualization technique 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
  • the support device 500 may include a plurality of processors such as the CPU 502. In this case, each part shown in FIG. 5 can be executed by a plurality of processors.
  • the CPU 502 includes a plurality of cores, each part shown in FIG. 5 can be executed by the plurality of cores in the CPU 502.
  • the PLC 100 includes a storage 119 including a processor 112 corresponding to a CPU, an HDD, a ROM, a RAM, and the like.
  • the storage 119 stores programs and data executed by the PLC 100. Part or all of the configuration provided by the PLC 100 by executing the program of the storage 119 may be implemented by using a dedicated hardware circuit (for example, ASIC or FPGA).
  • the main part of the PLC 100 may be realized using hardware that follows a general-purpose architecture. In this case, virtualization technology may be used to execute a plurality of OSs having different uses in parallel, and to execute necessary applications on each OS.
  • the PLC 100 may include a plurality of processors such as a CPU.
  • processors such as a CPU.
  • each program shown in FIG. 3 can be executed by a plurality of processors.
  • the CPU includes a plurality of cores
  • each program shown in FIG. 3 can be executed by the plurality of cores in the CPU.
  • the field device 90 includes a memory 92 including a processor 91 corresponding to a CPU, an HDD, a ROM, a RAM, and the like.
  • the memory 92 stores programs and data executed by the processor 91.
  • a part or all of the configuration provided by the processor 91 executing the program of the memory 92 may be implemented by using a dedicated hardware circuit (for example, ASIC or FPGA).
  • the main part of the PLC 100 may be realized using hardware that follows a general-purpose architecture. In this case, virtualization technology may be used to execute a plurality of OSs having different uses in parallel, and to execute necessary applications on each OS.
  • the processor 91 may include a plurality of processors such as a CPU.
  • each program shown in FIG. 4 can be executed by a plurality of processors.
  • the CPU includes a plurality of cores
  • each program shown in FIG. 4 can be executed by the plurality of cores in the CPU.
  • the storage medium 501 of the support device 500, the memory card 116 of the PLC 100, and the memory card 96 of the field device 90 display the information of the program or the like so that the computer or other device, the machine or the like can read the recorded program or the like.
  • the CPU 502 of the support device 500, the processor 112 of the PLC 100, and the processor 91 of the field device 90 may acquire the program described above from these storage media.
  • a control system including a plurality of control devices (100) connected to a network (11).
  • a program storage means (119) provided in each control device for storing a control program (69) having an instruction for calculating and updating a control command which is a value related to control of a control target (90, 90A, 90B), and
  • Operating means (112, 110) provided in each control device to operate the control program of the program storage means of the control device, and
  • a plurality of control programs having instructions for calculating and updating the same control command are arranged in one or more of the plurality of control devices, and the same control command is updated among the plurality of control programs.
  • a control system comprising arbitration means (64, 66) for arbitrating operating times between the plurality of control programs so that they do not compete with each other.
  • the mediation means The control system according to configuration 1, wherein the operation time of the plurality of control programs is statically determined so that updates of the same control command do not interfere with each other among the plurality of control programs.
  • the mediation means The plurality of control programs are distributed and arranged in the plurality of control devices, and the operation time is arbitrated so that each of the plurality of control programs is operated in order according to the progress of the process. Or the control system according to 2.
  • the control command includes the control command given to the control target, and the arbitration means further comprises.
  • the control system according to any one of configurations 1 to 3, wherein the control target generates identification information (87) for identifying the control command addressed to itself.
  • identification information for the control target to identify the control command addressed to itself includes an identifier (872) of a control program that updates the control command for the control target.
  • the identification information for the control target to identify the control command addressed to itself is the order in which the plurality of control commands are given to the control target when a plurality of control commands are given to the control target (871). ), The control system according to configuration 5.
  • FIG. 10 The control system according to any one of configurations 1 to 9, wherein the value relating to the control includes the value of a variable updated by the control program during operation.
  • FIG. 11 A support device (500) that can be connected to a control system including a plurality of control devices (100) connected to a network (11). Each said control device A program storage means (119) for storing a control program (69) having an instruction for calculating and updating a control command which is a value related to control of a controlled object, and An operating means (110, 112) for operating the control program of the program storage means of the control device is provided.
  • the support device is An arrangement means (63) for arranging a plurality of control programs having instructions for calculating and updating the same control command in one or more of the plurality of control devices, and A support device comprising an arbitration means (64) for arbitrating an operation time between the plurality of control programs so that updates of the same control command do not conflict with each other among the plurality of control programs.
  • Each said control device A program storage means (119) for storing a control program (69) having an instruction for calculating and updating a control command which is a value related to control of a controlled object, and An operating means (110, 112) for operating the control program of the program storage means of the control device is provided.
  • the setting program is applied to the computer (502).

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Programmable Controllers (AREA)

Abstract

複数の制御装置間で制御プログラムを自由に配置可能にする。 制御システムは、ネットワーク(11)接続される複数の制御装置(100)を備え、制御装置は、制御対象(90A,90B)の制御に関する値である制御指令を算出し更新する命令を有する制御プログラムを動作させる。サポート装置(500)は、同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、複数の制御装置のうちの1つ以上に配置するとともに、当該複数の制御プログラム間で同一の制御指令の更新が互いに競合しないように複数の制御プログラムの間で動作時間を調停する。

Description

制御システム、サポート装置および設定プログラム
 本開示は、対象を制御する制御システム、サポート装置および設定プログラムに関する。
 様々な生産現場において、PLC(プログラマブルロジックコントローラ)などの制御装置を用いたFA(Factory Automation)システムが広く普及している。PLCは、ロボットを含むフィールド機器などの制御対象の制御プログラムを動作(実行)することにより制御対象に制御指令を与える。近年は、FAシステムの規模が大きくなる傾向にあり、それに伴って、FAシステムはネットワーク接続される複数のPLCを備えて構成される。
 複数のPLCを備えるシステムとして、たとえば特開平10-164167号公報(特許文献1)は、通信装置を介して他のプログラマブルコントローラとの間でサイクリック型通信を行うプログラマブルコントローラを開示する。
特開平10-164167号公報
 従来は、複数のPLCを備えるシステムであっても、各制御プログラムに対応して、当該制御プログラムを動作させるPLCは固定である。その一方で、ユーザからは、FAシステムにおいて、複数のPLCの間で制御プログラムを自由に配置したいとのニーズがある。
 本開示は、上記のニーズに対応することができる制御システム、サポート装置および設定プログラムを提供することである。
 本開示の一例にかかる制御システムは、ネットワーク接続される複数の制御装置を備える制御システムであって、制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラムを記憶するための各制御装置に備えられるプログラム記憶手段と、各制御装置に備えられて、当該制御装置のプログラム記憶手段の制御プログラムを動作させる動作手段と、同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、複数の制御装置のうちの1つ以上に配置するとともに、当該複数の制御プログラム間で同一の制御指令の更新が互いに競合しないように複数の制御プログラムの間で動作時間を調停する調停手段と、を備える。
 この開示によれば、同一の制御対象に対する制御指令を算出し更新する複数の制御プログラムを、複数の制御装置のうちの1つ以上に配置する場合であっても、複数の制御プログラム間で同一の制御指令の更新が互いに競合しないように複数の制御プログラムの間で動作時間が自動的に調停される。したがって、ユーザは競合を意識せずに、複数のPLCの間で制御プログラムを自由に配置することが可能になる。
 上述の開示において、調停手段は、複数の制御プログラム間で同一の制御指令の更新が互いに競合しないように複数の制御プログラムの動作時間を静的に決定する。
 この開示によれば、競合を排除するように複数の制御プログラムの動作時間を静的に決定することができる。
 上述の開示において、調停手段は、複数の制御プログラムを複数の制御装置に分散して配置するとともに、工程の進行に応じて、複数の制御プログラムそれぞれが順番に動作されるように、前記動作時間を調停する。
 この開示によれば、競合を排除するように複数の制御プログラムの動作時間を決定する場合に、工程の進行に応じて動作時間を決定することができる。
 上述の開示において、制御指令は、前記制御対象に与えられる前記制御指令を含み、調停手段は、さらに、制御対象が自己宛の制御指令を識別するための識別情報を生成する。
 この開示によれば、競合しないような動作時間の調停が実施される場合に、制御対象に対しては、当該制御対象宛の制御指令を識別可能にする識別情報を生成することができる。
 上述の開示において、制御対象が自己宛の前記制御指令を識別するための識別情報は、当該制御対象に対する制御指令を更新した制御プログラムの識別子を含む。
 この開示によれば、制御対象が自己宛の制御指令を識別するために、制御プログラムの識別子を用いることが可能になる。
 上述の開示において、制御対象が自己宛の制御指令を識別するための識別情報は、当該制御対象に対して複数の制御指令が与えられる場合に、当該複数の制御指令が当該制御対象に与えられる順序を含む。
 この開示によれば、制御対象が自己宛の制御指令を識別するために、制御指令が自己に与えられるべき順序を用いることができる。
 上述の開示において、複数の制御指令が当該制御対象に与えられる順序は、当該複数の制御指令を更新する複数の制御プログラムの間で調停された動作時間に基づく。
 この開示によれば、制御対象に制御指令を与える順序は、制御プログラムの間で調停された動作時間に基き決定することができる。
 上述の開示において、制御装置は、動作手段によって、複数の制御プログラムを、調停された動作時間に従い切替えながら動作させるとき、1の制御プログラムへの切替えを制御対象に通知し、通知は、切替後に1の制御プログラムが更新する制御指令を識別するための識別情報を含む。
 この開示によれば、制御装置は、動作させる制御プログラムの切替時に、当該切替えの通知を出力し、この通知を利用して、制御対象に切替後の制御プログラムが更新する制御指令を識別するための識別情報を提供することができる。
 上述の開示において、識別情報は、制御指令の種類を含む。この開示によれば、制御対象に提供し得る識別情報に、当該制御対象に与えられる制御指令に対応の種類、例えば変数の種類を含めることできる。
 上述の開示において、制御に関する値は、動作時に制御プログラムが更新する変数の値を含む。この開示によれば、制御に関する値は制御プログラム動作時に更新される変数の値、例えば制御プログラム間で共有される制御対象の状態値、制御指令、指令値などを含む。
 本開示にかかるサポート装置は、ネットワーク接続される複数の制御装置を備える制御システムに接続可能なサポート装置であって、各制御装置は、制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラムを記憶するためのプログラム記憶手段と、当該制御装置のプログラム記憶手段の制御プログラムを動作させる動作手段と、を備え、サポート装置は、同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、複数の制御装置のうちの1つ以上に配置する配置手段と、複数の制御プログラム間で同一の制御指令の更新が互いに競合しないように複数の制御プログラムの間で動作時間を調停する調停手段と、を備える。
 この開示によれば、同一の制御対象に対して制御指令を算出し更新する複数の制御プログラムを、複数の制御装置のうちの1つ以上に配置する場合であっても、各制御プログラムからの制御指令の更新が互いに競合しないように複数の制御プログラムの間で動作時間が自動的に調停される。したがって、ユーザは競合を意識せずに、複数の制御装置の間で制御プログラムを自由に配置することが可能になる。
 本開示にかかる設定プログラムは、ネットワーク接続される複数の制御装置を備える制御システムの挙動を設定するための設定プログラムであって、各制御装置は、制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラムを記憶するためのプログラム記憶手段と、当該制御装置のプログラム記憶手段の制御プログラムを動作させる動作手段と、を備え、設定プログラムは、コンピュータに、同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、複数の制御装置のうちの1つ以上に配置するステップと、複数の制御プログラム間で同一の制御指令の更新が互いに競合しないように複数の制御プログラムの間で動作時間を調停するステップと、を実行させる。
 この開示によれば、同一の制御対象に対する制御指令を算出し更新する複数の制御プログラムを、複数の制御装置のうちの1つ以上に配置する場合であっても、各制御プログラムからの制御指令が互いに競合しないように複数の制御プログラムの間で動作時間が自動的に調停される。したがって、ユーザは競合を意識せずに、複数のPLCの間で制御プログラムを自由に配置することが可能になる。
 本開示によれば、制御システムの制御装置間における制御プログラムの配置の自由度を向上させることができる。
本実施の形態にかかるシステム1の全体構成を模式的に示す図である。 本実施の形態にかかるシステム1の全体構成を模式的に示す図である。 本実施の形態にかかるPLC100の要部構成を示す模式図である。 本発明の実施の形態に係るフィールド装置90の要部構成を模式的に示す図である。 本実施の形態にかかるサポート装置500の構成を概略的に示す図である。 基本的な通信フレーム20の一例を示し、図7は変数管理の「変数管理者」の切替えの通知31を送信するための通信フレーム20の一例を示す。 本実施の形態にかかる通信フレーム20の構成の一例を模式的に示す図である。 本実施の形態にかかるストリームID29を説明するための図である。 本実施の形態にかかる設定ツール600の調停処理を模式的に示すフローチャートである。 本実施の形態にかかるUPGスケジュール65の一例を説明する図である。 本実施の形態にかかるUPGスケジュール65の一例を説明する図である。 本実施の形態にかかるUPGスケジュール65の一例を模式的に示す図である。 本実施の形態にかかるストリーム情報87の一例を模式的に示す図である。 本実施の形態にかかるUPG69の配置処理の一例を示すフローチャートである。 本実施の形態にかかるUPG69に関する情報150の一例を示す図である。 図15に示す変数153の制御指令に従い動作するフィールド装置90を示す図である。 本実施の形態にかかるフィールド装置90が備える機能を模式的に示す図である。 本実施の形態にかかるPLC100が備える機能を模式的に示す図である。 本発明の実施の形態にかかる静的固定モードを模式的に説明する図である。 本発明の実施の形態にかかる静的固定モードの処理の一例を示すフローチャートである。 本発明の実施の形態にかかる動的変動モードを模式的に説明する図である。 本発明の実施の形態にかかる動的変動モードのタイミングチャートである。 本実施の形態にかかる動的変動モードのための支援ツールの処理を模式的に示すフローチャートである。 本実施の形態にかかる動的変動モードにおけるUPG実行前の処理の一例を示すフローチャートである。 本実施の形態にかかる動的変動モードにおけるUPG実行開始時の処理の一例を示すフローチャートである。 本実施の形態にかかるUPG実行中の処理の一例を示すフローチャートである。 本実施の形態にかかるUPG実行中の処理の一例を示すフローチャートである。 本実施の形態にかかる動的変動モードにおける変数管理者切替えの処理例を模式的に示す図である。 本実施の形態にかかる管理者切替の通知31とデバイスの動作の関連性を表形式で示す図である。 本実施の形態のUPGスケジュールの他の例を模式的に示す図である。 本実施の形態にかかる動的変動モードの(第1ケース)に従うフィールド装置90の処理の概要を示すフローチャートである。 本実施の形態にかかる動的変動モードの(第1ケース)に従うフィールド装置90の処理の概要を示すフローチャートである。 本実施の形態にかかる(第2ケース)に従うフィールド装置90の処理の概要を示すフローチャートである。 本実施の形態にかかる(第2ケース)に従うストリーム情報の一例を示す図である。 本実施の形態にかかる(第3ケース)に従うデバイスの処理を示すフローチャートである。 本実施の形態にかかる(第3ケース)に従うストリーム情報の一例を示す図である。 本実施の形態にかかる変数管理の概念を模式的に示す図である。
 以下、図面を参照しつつ、本発明に従う実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがって、これらについての詳細な説明は繰り返さない。
 <A.適用例>
 まず、図1と図2を参照して、本発明が適用される場面の一例について説明する。図1と図2は、本実施の形態にかかるシステム1の全体構成を模式的に示す図である。図1を参照して、FAに適用されるシステム1は、機器群3A,3B,3C,および3Dを備える。機器群3A,3B,3C,および3Dは、それぞれ、ネットワーク11に接続されたPLC100A,100B,100Cおよび100Dと、各PLCに接続される1または複数のフィールド装置90を備える。図1の機器群3Aのフィールド装置90は図2のロボット900Aのロボットコントローラ90Aを含み、機器群3Bのフィールド装置90は図2のロボット900Bのロボットコントローラ90Bを含む。フィールド装置90は、「制御対象」の一実施例である。
 PLC100A,100B,100Cおよび100Dは、例えば「制御装置」の一実施例であり、それぞれは同様の機能を備えるので、これらを区別しない場合はPLC100と総称する。システム1は、また、ネットワーク11にサポート装置500を接続することができる。なお、システム1には、PLC100とネットワーク11を介して通信するシステム1の管理用サーバが接続されてもよい。
 各PLC100は、ネットワーク11を介して1または複数のフィールド側のフィールド装置90を接続する。フィールド装置90の各々は、製造装置または生産ラインなど(以下、「フィールド」とも総称する。)に対して何らかの物理的な作用を与えるアクチュエータ、フィールドとの間で情報を遣り取りする入出力装置、およびロボット900Aおよび900Bを制御するロボットコントローラ90A、90Bなどを含む。なお、フィールド装置の種類は、これらに限定されない。ここでは、2台のロボット900A,900Bを示したが、ロボットの台数は2台に限定されない。
 システム1では、PLC100Aのタイマ101A、PLC100Bのタイマ101B、PLC100Cのタイマ101CおよびPLC100Dのタイマ101Dは、互いに時刻同期されている。また、PLC100と、当該PLC100に接続される1または複数のフィールド装置90は互いに時刻同期する。これにより、システム1では、全機器が互いに時刻同期する。
 システム1では、また、PLC100間のネットワーク11とフィールド側のネットワーク11に統一した通信プロトコルが適用される。本実施の形態では、この統一した通信プロトコルとして、例えばTSN(Time-Sensitive Networking)が採用される。したがって、システム1の全デバイス(PLC100およびフィールド装置90)間でデータを遣り取りする場合に、PLC100どうしの通信プロトコルとPLC100とフィールド装置90との間の通信プロトコルが異なるケースに比較して、通信プロトコルの変換を省略することができて、その分、高速に通信することができる。TSNの通信時間は、システム1の制御周期に比べて十分に短い。したがって、制御周期毎に、全デバイス間でデータを共有することが可能となる。
 PLC100は、制御周期毎にフィールドとデータを遣り取りするIOリフレッシュ72を実施するとともに、フィールドから収集したフィールド値に基づいて後述するUPG(User Program)69を実行する。UPG69は制御対象の制御に関する値である制御指令を算出し更新する命令を有する「制御プログラム」の一実施例である。フィールドから収集されるフィールド値は、制御対象の状態を示す状態値を含み得る。PLC100は、UPG69の命令を実行することにより、フィールド値に基いた制御演算処理を実行し、制御演算処理による算出値をフィールド装置90に送信する。この算出値は、フィールド装置90を制御するための「制御指令」の一実施例に相当する。「制御指令」は、制御に関する値であればよく、限定さないが、UPG69間で共有される値(例えば、制御対象の挙動を示す値(状態値)など)または制御対象に与えられる値(例えば、指令値、制御量など)を含む。
 このように、PLC100は、制御周期毎に、フィールド装置90からのフィールド値を収集し、UPG69の実行により算出された制御指令をフィールド装置90に出力するIOリフレッシュ72を実行する。システム1では、PLC100におけるUPG69の制御演算処理およびIOリフレッシュ72を、上記した時刻同期に基づく時間であってPLC100とフィールド装置90との間で共有される時間である、例えば制御周期内で実行することができる。
 サポート装置500は、ユーザがシステム1を運用するのを支援する支援ツールを提供する。支援ツールは、UPG69の実行環境またはPLC100との通信環境等の準備の設定ツールを含む。支援ツールは、例えばUI(User Interface)によりユーザに提供される。サポート装置500は、ネットワーク11に接続され得るが、PLC100に内蔵されてもよい。
 図2では、例えば、PLC100Aに接続されるロボット900AとPLC100Bに接続されたロボット900Bは、連携動作して、ワーク912の加工に適用される。具体的には、加工工程では、ロボット900Aは、アームでトレイ911上のワーク912をつかみ(ピック:Pick)、ワーク912を保持している(サポート:Support)際に、保持されているワーク912は、ロボット900Bのアームの先端に備えられた加工用キットで加工(Manufacture)されて、その後、ロボット900Aが、ワーク912を所定位置に置く(プレース:Place)。
 このようなピック→サポート→加工→プレースの一連の工程では、各工程に対応したUPG69が切替えながら実行されて、各UPG69から出力される制御指令が、対応の制御対象であるロボット900A,900Bのロボットコントローラ90A,90Bに与えられて、ロボットコントローラ90A,90Bが制御指令に従い動作することにより当該工程が実施される。
 システム1では、PLC100が実行するUPG69として、「ピック」の制御指令を出力するUPG(1)、「サポート」の制御指令を出力するUPG(2)、「加工」の制御指令を出力するUPG(3)および「プレース」の制御指令を出力するUPG(4)を例示する。図2では、「ピック」、「サポート」および「プレース」の制御指令を受けるロボットコントローラ90AはPLC100Aに接続されているので、制御指令の通信遅延(通信所要時間)を考慮した場合、通信遅延を最短にするには、UPG(1)、UPG(2)およびUPG(4)をPLC100Aに固定配置してPLC100Aで実行し、UPG(3)をPLC100Bに固定配置してPLC100Bで実行するのが望ましい。
 これに対して、本実施の形態にかかるシステム1では、上記に述べたようにネットワーク11に統一プロトコルを適用することで、制御周期内(より特定的にはIOリフレッシュ72の期間内)でデバイス間においてデータを共有することが可能となるから、ロボット900Aまたは900Bの制御指令を出力するUPG69の配置に関して、通信遅延を意識せずにいずれかのPLC100に自由に配置することが可能となる。
 サポート装置500が提供する設定ツール600は、PLC100間において自由にUPG69の配置を決定するための配置ツール63およびスケジュール生成ツール64を含む。配置ツール63は、同一の制御対象(ロボット900A)に制御指令を与えるための複数の制御プログラム(UPG69)を、複数の制御装置(PLC100)のうちの1つ以上に配置(ダウンロード)するよう決定することができる。
 例えば、配置ツール63は、まずUPG(1)について、各PLC100で実行された場合の通信遅延時間を測定し、通信遅延時間が最小であるPLC100を、当該UPG(1)のロード先として決定する。残りのUPG(2)、(3)および(4)のそれぞれについても、同様に、その通信遅延時間に基づきロード先のPLC100を決定する。この決定に従い、図1では、UPG(1)とUPG(2)はPLC100A、UPG(3)はPLC100B、UPG(4)はPLC100Dにそれぞれ配置される。このように、同一の制御対象に対して制御指令を与えるための複数のUPG(1)、UPG(2)およびUPG(4)を、PLC100Aに固定ではなく、その通信遅延時間に応じてPLC100Aと100Dに配置することができる。なお、配置のための基準は、通信遅延時間に限定されない。
 スケジュール生成ツール64は、同一の制御指令を算出し更新する命令を有しているUPG69間で制御指令の更新が互いに競合しないように複数のUPG69の間で動作時間(実行される時間)を調停する「調停手段」の一実施例である。スケジュール生成ツール64は、それぞれが同一の制御指令を算出し更新する命令を有しているUPG(1)~(4)が実行される場合に各UPGによる制御指令の更新が互いに競合しないようにUPG(1)~UPG(4)が実行される動作時間を調停するUPGスケジュール65を生成する。生成されたUPGスケジュール65は、各PLC100に与えられる。
 PLC100は、生成されたUPGスケジュール65に従い自己に配置されたUPGを実行する。したがって、UPG(1)~(4)を自由に配置した場合であっても、上記の競合を回避しながら制御対象(ロボットコントローラ90A,90B)に制御指令を与えることができる。本実施の形態では、「複数のUPG69間で同一の制御指令の更新が互いに競合する」とは、複数のUPG69が実行されることにより、複数のUPG69により同一の制御指令が同時に更新(書込)される(または更新されようとする)ことを意味する。
 このように、本実施の形態のシステム1では、上記の競合が回避されるから、ユーザが任意のPLC100にUPG69を自由に配置する場合であっても、各UPG69が実行されることで更新される制御指令を、制御指令の干渉を回避しながら制御対象に与えることが可能となる。本実施の形態では、制御指令の「干渉」は、同一の制御対象に対して同一種類の複数の制御指令が同時に与えられる場合を意味する。したがって、ユーザは、上述したUPG69間の競合および制御指令間の干渉を意識せずにUPG69を配置することが可能となり、UPG69の配置に関して高い自由度を得ることができる。
 (a1.変数管理者の概念)
 本実施の形態にかかるシステム1では、UPG69が任意のPLC100に配置可能であることから、変数管理者はPLC100ではなくUPG69自身とする。この変数管理者の概念を説明する。
 本実施の形態にかかるUPG69は、いわゆる変数プログラムである。すなわち、UPG69は、当該プログラムが実行時に参照する入力データ(フィールド値)、出力データ(制御指令)、内部計算用データなどはデータ別に入力変数、出力変数、および一時変数などを用いて利用できるよう構成される。本実施の形態では、これら入力変数および出力変数を管理する変数管理者を、PLC100からUPG69に変更する。本実施の形態では、「変数管理者」は、変数の値の書き換えの権限を有する主体を表す。
 この変数管理者の切替えについて説明する。例えば、ロボット900Aのアームの現在位置(フィールド値)が設定される入力変数、およびロボット900Aのアームの位置を変更するための指令値(制御指令)が設定される出力変数は、当該変数を利用(宣言)しているUPG69によって参照される。本実施の形態では、上記の「ピック」、「サポート」および「プレース」を実施するためのUPG(1)、UPG(2)およびUPG(4)は、いずれも、ロボット900Aのアームを制御可能なように、ロボット900Aのアームの現在位置(フィールド値)が設定される入力変数、およびロボット900Aのアームの位置を変更するための指令値(制御指令)が設定される出力変数を利用し、これら変数を読書きする。したがって、「ピック」、「サポート」および「プレース」を実施するためにUPG(1)、UPG(2)およびUPG(4)がUPGスケジュール65に従い順に実行される場合に、指令値(制御指令)が設定される出力変数の「変数管理者」は、UPGスケジュール65に従いUPG(1)、UPG(2)およびUPG(4)と順に切替る。このように変数管理者をPLC100からUPG69の変更したことに伴い、本実施の形態では、制御指令には、変数管理者(UPG69)の識別子を含める。したがって、制御対象は、自己宛の制御指令であるかを、当該制御指令の変数管理者の識別子に基き判定することが可能となる。
 <B.PLC100のハードウェア構成>
 図3は、本実施の形態にかかるPLC100の要部構成を示す模式図である。図3を参照して、PLC100は、演算処理部110、通信回路130、DMA(Direct Memory Access)コントローラ140、高精度なタイマ160、通信コントローラ107、ネットワーク11を接続する通信ポート136および137、およびメモリカードインターフェイス108を含む。
 演算処理部110は、プロセッサ112、記憶部114およびストレージ119を含む。説明の便宜上、PLC100には、1つのプロセッサ112のみを備えるが、複数のプロセッサが実装されてもよい。なお、各プロセッサは、複数のコアを有していてもよい。演算処理部110においては、プロセッサ112が1または複数のタスクを周期的に実行する。演算処理部110で複数のタスクが実行される場合には、それらの複数のタスクに対して、互いに異なる優先度が設定されてもよい。
 プロセッサ112は、通信回路130の後述するバッファ132に格納された後述する通信フレーム20(例えば、入力データ134、出力データ135)を記憶部114に転送する。記憶部114は、DRAM(Dynamic Random Access Memory)またはSRAM(Static Random Access Memory)などを備えて構成され、プロセッサ112でのプログラムの実行に必要なワーク領域を提供する。
 ストレージ119は、フラッシュメモリまたはハードディスクなどを備えて構成され、周辺処理プログラム120、上記の時刻同期を実施するための時刻同期プログラム121、IOリフレッシュプログラム125、システムプログラム122、スケジューラ123、1または複数のUPG69を含むUPGライブラリ170、通信プログラム127およびコンフィギュレーション126などを格納する。ストレージ119は「プログラム記憶手段」の一実施例である。
 システムプログラム122は、プロセッサ112においてUPG69を実行するためのOS(Operating System)および関数などのライブラリを含む。IOリフレッシュプログラム125は、実行されるとIOリフレッシュ72を実施する。IOリフレッシュ72では、通信回路130を介して受信する通信フレーム20に含まれるフィールド値(入力データ)を演算処理部110に送信する。また、IOリフレッシュプログラム125は、PLC100で算出される制御指令(出力データ)をフィールド装置90へ送信する。このように、IOリフレッシュプログラム125は、入力データおよび出力データの少なくともいずれかを転送するIOリフレッシュ72を実現する。
 UPG69は、制御対象の機械や設備に応じて任意に作成される「制御演算処理」のプログラムである。具体的には、UPG69は、制御対象の「シーケンス制御」のために、記憶部114の入力データ134に基づく制御指令の算出と更新を実施する命令を有する制御演算プログラムと、ロボット900A,900Bなどの「モーション制御」のために、入力データ134に基づく制御指令の算出と更新を実施する命令を有するモーションプログラムとを含む。モーション制御は、制御対象となるサーボモータなどのアクチュエータに対して、位置、速度、加速度、角度などの数値を含む指令値を算出する。モーション制御により、ロボット900A,900Bのアームに関連したサーボモータが制御されて、制御指令に従いアームが動作する。これらUPG69の制御演算処理による制御指令などの算出値は、出力データ135として記憶部114に格納される。
 通信プログラム127は、記憶部114の出力データ135を用いて通信フレーム20を生成するとともに、通信フレーム20を送受信するように通信回路130を制御する。通信プログラム127は、後述する管理者切替の通知31を送信するための管理者切替プログラム128、およびストリーム処理を実施するためのストリーム処理プログラム129を含む。
 周辺処理プログラム120は、UPG69により実施される制御演算処理などとは異なる処理であって、制御演算処理の周辺で実施される処理であり、例えばネットワーク11を介して遣り取りされる通信フレーム20のロギング処理などを含む。
 スケジューラ123は、PLC100のプロセスまたはタスクなどに対して、優先度に従いリソース割当てや実行タイミングなどを管理するプログラムである。このような、プロセスまたはタスクは、周辺処理プログラム120、UPG69、IOリフレッシュプログラム125、時刻同期プログラム121、通信プログラム127などが、プロセッサ112により実行されることにより生成され得るプロセスまたはタスクが含まれる。スケジューラ123は、時刻同期したタイマ160に従い、例えば予め定められた制御周期に基づく周期で各プログラムの実行タイミングを調整する。これにより、PLC100は、制御演算処理およびIOリフレッシュ72を、他のPLC100との間およびフィールド装置90との間で同期した時刻に基づく周期でサイクリックに実施することができる。
 コンフィギュレーション126は、PLC100でのプログラム実行に必要な各種設定値やネットワーク構成を定義する各種設定値を含む。コンフィギュレーション126は、例えば、サポート装置500により生成されたUPGスケジュール65を含む。
 通信コントローラ107は、ネットワーク11または別の通信路を介してUPG69またはUPGスケジュール65を受信する。メモリカードインターフェイス108は、メモリカード116を脱着可能に構成されており、メモリカード116に対してデータを書込み、メモリカード116から各種データ(ユーザプログラムまたはデータなど)を読出すことが可能になっている。UPG69またはUPGスケジュール65は、メモリカード116からストレージ119にロードされてもよい。
 通信回路130は、ネットワーク11を物理的に接続する通信ポート136および137を接続する。限定されないが、例えば通信ポート136は、他のPLC100側に繋がるネットワーク11が接続され、通信ポート137はフィールド装置90側に繋がるネットワーク11が接続される。通信回路130は、通信ポート136,137を介して他の装置と通信フレーム20を遣り取りする。通信回路130は、ネットワーク11を介して送受信される通信フレーム20を一時的に格納するバッファ132を備える。バッファ132に一時的に格納される通信フレーム20は、例えば、入力データ134および出力データ135を含む。
 通信回路130は通信フレーム20の送受信を例えば次のように実施する。通信回路130は、プロセッサ112の指令に従い、DMAコントローラ140を介した記憶部114からの出力データ135に基づく通信フレーム20をコピーして、コピーを出力データ135としてバッファ132に格納するとともに、通信フレーム20をネットワーク11上に送信する。
 また、通信回路130は、プロセッサ112の指令に従い、ネットワーク11から到来(受信)する通信フレーム20をコピーして、コピーを入力データ134としてバッファ132に格納するとともに、通信フレーム20を演算処理部110へ出力する。この通信フレーム20は、入力データとして記憶部114に格納される。
 記憶部114には、送受信される通信フレーム20のデータが、制御周期よりも長い期間に亘り蓄積されてもよく、直近の制御周期の通信フレーム20のデータのみが蓄積されるとしてもよい。
 本実施の形態において、PLC100による「IOリフレッシュ72」は、出力データ135(通信フレーム20)の他の装置への送信、および他の装置からの入力データ134の受信のうちの少なくとも一方を含む。「IOリフレッシュ72」では、入力データ134はフィールド装置90により収集されて転送されるフィールド値の通信フレーム20に対応し、出力データ135は、PLC100のUPG69の制御演算処理により算出された制御指令の通信フレーム20に対応する。
 DMAコントローラ140は、演算処理部110および通信回路130に接続され、演算処理部110と通信回路130との間で、データアクセスを高速化する機能を備える。これにより、IOリフレッシュ処理時間の短縮と送信タイミングのジッタの低減が可能となる。
 図3に示す構成においては、説明の便宜上、演算処理部110、通信回路130およびDMAコントローラ140に区別した構成を描いているが、これに限られることなく任意の実装形態を採用できる。例えば、演算処理部110の全部または一部と通信回路130の全部または一部とを同一のチップ上に実装したSoC(System on Chip)で構成してもよい。あるいは、演算処理部110のプロセッサ112とDMAコントローラ140の主要機能とを同一のチップ上に実装したSoCを用いてもよい。これらの実装形態については、適宜選択可能である。
 <C.フィールド装置90のハードウェア構成>
 図4は、本発明の実施の形態に係るフィールド装置90の要部構成を模式的に示す図である。図4の構成は、ロボットコントローラ90A,90Bにも適用することができる。図4を参照して、フィールド装置90は、プロセッサ91、メモリ92、サーボモータなどを接続する通信I/F(Interface)93、ネットワーク11を接続する通信回路94、PLC100のタイマ160と同様の構成を備えるタイマ99、およびメモリカード96が脱着可能に装着されるメモリカードインターフェイス95を備える。このような機器はメモリカード96を取り扱う機能および回路を備えないこともあり得る。したがって、フィールド装置90は、メモリカード96に関連した機能および回路を備えない装置も含み得る。
 通信I/F93は、プロセッサ91からの指令に従い、制御対象からのフィールド値を受信するとともに、プロセッサ91からの制御指令を制御対象に送信する。これにより、制御対象は、指令値,制御量に従い制御されて、その結果であるフィールド値を出力する。
 通信回路94は、ネットワーク11を物理的に接続する通信ポート971および972を備える。通信回路94は、通信ポート971,972を介して他の装置と通信フレーム20を遣り取りする。限定されないが、通信ポート971はPLC100側に繋がるネットワーク11を接続し、通信ポート972はフィールド装置90側に繋がるネットワーク11を接続する。
 また、通信回路94は、ネットワーク11を介して送受信される通信フレーム20を一時的に格納するバッファ941を備える。バッファ941には、通信フレーム20が例えば、入力データ944または出力データ943として一時的に格納される。
 メモリ92は、フラッシュメモリ、ハードディスク、DRAMまたはSRAMなどを備えて構成され、プロセッサ91でのプログラムの実行に必要なワーク領域を提供する。メモリ92は、システムプログラム81、フィールド装置90に接続される制御対象(サーボモータ、ロボット)などを動作させるためのプログラムを含むアプリケーションプログラム82、通信プログラム83、プログラムを周期的に実行させるためのスケジューラ84、後述するストリーム情報87または動的ストリーム情報870を含む変数管理モジュール85、出力データ943および入力データ944などを格納する。出力データ943および入力データ944は、通信フレーム20に相当する。メモリ92には、PLC100を経由してサポート装置500から、またはメモリカードインターフェイス95を介してメモリカード96からプログラムまたはデータが格納され得る。
 通信プログラム83は、通信I/F93および通信回路94を制御するプログラムである。通信プログラム83は、時刻同期を実施するための時刻同期プログラム831を含む。
 通信回路94は、プロセッサ91の指令に従い、メモリ92の出力データ943の通信フレーム20をコピーして、コピーを出力データ943としてバッファ941に格納するとともに、当該通信フレーム20をネットワーク11上に送信する。また、通信回路94は、プロセッサ91の指令に従い、ネットワーク11から到来する通信フレーム20を受信し、当該通信フレーム20をコピーし、コピーを入力データ944としてバッファ941に格納する。また、プロセッサ91は、当該通信フレーム20の入力データ944をメモリ92に格納する。
 <D.サポート装置500のハードウェア構成>
 図5は、本実施の形態にかかるサポート装置500の構成を概略的に示す図である。図5を参照して、サポート装置500は、CPU(Central Processing Unit)502とプログラムおよびデータを格納する格納部を備えて、プログラムに従って動作するコンピュータシステムである。格納部は、ROM(Read Only Memory)503、RAM(Random Access Memory)504およびHDD(Hard Disk Drive)505を含む。サポート装置500は、さらに、通信コントローラ507およびI/O(Input/Output)インターフェイス508を含む。サポート装置500は、さらに、キーボード509およびディスプレイ510を含む。キーボード509は、ユーザからのサポート装置500に対する指示を含む入力を受付ける。当該入力を受付けるために、サポート装置500は、マウス等の他のデバイスを含んでもよい。ディスプレイ510は、LCD(Liquid Crystal Display)または有機EL(Electro Luminescence)を含み、サポート装置500から出力される映像信号または画像信号に従う映像または画像を表示する。サポート装置500は、外部の記憶媒体501を脱着自在に装着し、装着された記憶媒体501にプログラムおよび/またはデータを読み書きするR/W(リーダライタ)デバイス506を備える。
 通信コントローラ507は、ネットワーク11を介したサポート装置500と外部デバイスとの通信を制御する。通信コントローラ507は、例えばNIC(Network Interface Card)を含んで構成される。I/Oインターフェイス508は、CPU502とキーボード509およびディスプレイ510との間のデータの遣り取りを制御する。
 HDD505は、OSを含むシステムプログラム71、UPG69を生成するためのUPG生成プログラム68、生成された1または複数のUPG69、UPGスケジュール65、ストリーム情報87、UPG69の配置を決定する配置プログラム62、UPGスケジュール65を生成するためのスケジュール生成プログラム66、ストリーム情報87を生成するためのストリーム情報生成プログラム67を含む。スケジュール生成プログラム66は、UPGスケジュール65において変数管理者の競合が有るか否かを判定する競合検出プログラム611を含む。この変数管理者の競合については後述する。スケジュール生成プログラム66は起動されると、スケジュール生成ツール64が提供される。
 UPG生成プログラム68は、キーボード509から受け付けるユーザ操作に従いUPG69を編集(生成)するエディタ、編集されたUPG69をコンパイルするコンパイラ、UPG69を実行可能な形式に変換するビルダなどを含む。なお、ビルダが、コンパイルの機能を含んでもよい。
 <E.通信フレーム20の構成>
 図6および図7は、本実施の形態にかかる通信フレーム20の構成の一例を模式的に示す図である。図6は、基本的な通信フレーム20の一例を示し、図7は変数管理の「変数管理者」の切替えの通知31を送信するための通信フレーム20の一例を示す。
 (e1.基本的な通信フレーム)
 図6を参照して、基本的な通信フレーム20は、プリアンブルを格納する領域21、フレームの宛先22を格納する領域、フレームの送信元を格納する領域23、タグの領域24、ネットワークのタイプを格納する領域25、および誤り訂正のための領域27を含み、さらに、転送されるべきデータ本体であるペイロード26を格納する領域を含む。通信フレーム20の宛先22および領域23の送信元は、各装置を一意に識別する情報、例えばMAC(Media Access Control address)を含む。図6の基本的な通信フレーム20の場合は、ペイロード26は、例えばフィールド値に相当する入力データ134,944または制御指令に相当する出力データ135,943を含む。
 宛先22の領域は、通信フレーム20の転送を管理するためのストリームID(Identifier)29を含む。図8は、本実施の形態にかかるストリームID29を説明するための図である。本実施の形態では、ネットワーク11上を転送される通信フレーム20はフロー12の単位で管理される。図8に示すように、ネットワーク11に接続される装置は、通信フレーム20の送信元(TALKER)または送信先(LISTENER)となり得る。各フロー12は、TALKERの識別子とLISTENERの識別子の組で規定されるストリームIDが割当てられる。
 本実施の形態では、ペイロード26が制御指令である場合は、TALKERは、ペイロード26(制御指令)の送信元となるUPG69の識別子が割り当てられて、LISTENERには送信先装置(フィールド装置90)のMACアドレスが割り当てられる。本実施の形態では、ペイロード26がフィールド値である場合は、TALKERは、送信元の装置のMACアドレスが割り当てられて、LISTENERには送信先装置のMACアドレスが割り当てられる。したがって、各装置は、遣り取りする各通信フレーム20を、そのストリームID29に基き一意に識別することが可能となる。
 (e2.通信フレーム20のペイロード)
 例えば、図6の通信フレーム20には、ペイロード26として制御系データが格納され得る。ペイロード26の領域は、制御系データのうちのフィールド値を格納する領域と、制御系データのうちの制御指令を格納する領域とを備える。
 各フィールド装置90は、ペイロード26の領域を読み書きする場合、例えば、当該装置に個別に割当てられているオフセット(例えば、通信フレーム20の先頭からのオフセット)に基づいたペイロード26の領域内の位置を特定し、特定した位置でデータを読み書きする。具体的には、通信プログラム83は、到来した通信フレーム20のペイロード26の領域の自装置のオフセットに基く位置から、指令値,制御量(入力データ944または出力データ135)を読出し、また、送信すべき通信フレーム20のペイロード26の領域のオフセットに基づく位置にフィールド値(出力データ943または入力データ134)を書込む。
 一方、PLC100は各フィールド装置90に割当てられたオフセット情報を記憶している。したがって、PLC100は、このオフセット情報に基き、到来する通信フレーム20のペイロード26の領域内から各フィールド装置90のフィールド値(出力データ943または入力データ134)を読出し、また、このオフセット情報に基き、送信すべき通信フレーム20のペイロード26の領域内の各フィールド装置90のオフセット位置に、制御指令(入力データ944または出力データ135)を書込むことができる。
 これにより、PLC100は、通信フレーム20のペイロード26の領域に各フィールド装置90の制御系データを読み書きでき、また、各フィールド装置90は通信フレーム20のペイロード26の領域に自装置の制御系データを読み書きすることができる。
 (e3.「変数管理者」切替えの通知31の通信フレーム)
 図7を参照して、通信フレーム20は、例えば、領域23には通知31の送信元(TALKER)の装置のMACアドレスが格納され、宛先22の領域には通知31の送信先(LISTENER)としてマルチキャストアドレス30が格納され、ペイロード26の領域には、「変数管理者」の切替えがあったことを示す通知31を含むペイロードが格納される。本実施の形態では、宛先22の領域にはマルチキャストアドレスが格納されるので、ネットワーク11に接続されるデバイス(PLC100またはフィールド装置90)は、図7の通知31を格納した通信フレーム20を受信して、通知31から「変数管理者」の切替えがあったことを検出することができる。
 <F.支援ツール>
 サポート装置500が提供する支援ツールを説明する。まず、各工程で実行されるUPG69の生成と、UPGスケジュール65およびストリーム情報87を生成する処理を説明する。
 (f1.生成処理)
 図9は、本実施の形態にかかる設定ツール600の調停処理を模式的に示すフローチャートである。設定ツール600は、同一の制御対象(フィールド装置90)に対して制御指令を与えるための複数の制御プログラム(UPG69)を、複数のPLC100のうちの1つ以上に配置するステップと、各制御プログラムからの制御指令が互いに干渉しないように複数の制御プログラムの間で動作時間を調停するステップ(S1~S7)を実施する。配置するステップは、図14で後述する。
 サポート装置500のUPG生成プログラム68が起動されると、UPG生成プログラム68は、キーボード509を介したユーザ操作から、工程の定義を受付ける(ステップS1)。工程の定義として、例えば、「ピック(Pick)」、「サポート(Support)」、「置く(Place)」および「加工(Manufacture)」を受付ける。図10と図11は、本実施の形態にかかるUPGスケジュール65の一例を説明する図である。例えば、ステップS1では、図10に示すように、工程Pick、Support、ManufactureおよびPlaceのうち、工程Pick、SupportおよびPlaceは制御対象(ロボット900A)に割り当てられて、工程Manufactureは制御対象(ロボット900B)に割り当てられる。
 スケジュール生成プログラム66が起動されて、スケジュール生成プログラム66は、キーボード509を介したユーザ操作から、ステップS1で定義された工程を実施するためのスケジュールを受付ける(ステップS3)。スケジュールは、例えばUPG69の実行の順序(各UPG69が実行される時間、実行のタイミングなど)を示す。
 UPG生成プログラム68は、キーボード509を介したユーザ操作から、ステップS1で定義された各工程に対応したUPG69を生成する(ステップS5)。これにより、UPG69としてUPG(1)~(4)が生成されて、HDD505に格納される。
 スケジュール生成プログラム66の競合検出プログラム611は、ステップS3でユーザから受付けたスケジュールに基づき、各UPG69が実行される時間において、当該UPG69と他のUPG69との間において変数管理者が競合しているか否かを判定する(ステップS7)。すなわち、調停の要否の有無が判定される。
 競合検出プログラム611は、変数管理者が競合していると判定すると(ステップS7でYES)、ディスプレイ510を介して当該競合を解消するようなスケジュールの設定をユーザに促す情報を表示し、ステップS3に戻る。ステップS3では、スケジュール生成プログラム66は、ユーザから、競合を解消するようなスケジュールを受付けることができる。
 競合検出プログラム611は、変数管理者が競合していないと判定すると(ステップS7でNO)、スケジュール生成プログラム66は、ステップS3で受付けたユーザ操作に従い、競合のないUPGスケジュール65を生成し、ストリーム情報生成プログラム67は、図11のストリーム情報87を生成する(ステップS9)。サポート装置500は、生成されたUPGスケジュール65およびストリーム情報87はHDD505に格納するか、またはPLC100,フィールド装置90に転送(ダウンロード)する。
 (f2.変数管理者競合の検出と動作時間の調停)
 本実施の形態では、同一の制御対象に与える制御指令(指令値)が設定される1の出力変数に対応の変数管理者(UPG69)が2つ以上ある場合に、この2つ以上のUPG69が動作する時間が重複する(例えば、同じ時間に実行される)ことを、「変数管理者の競合」という。「変数管理者の競合」する場合、同一の制御指令を算出し更新する命令を有している複数のUPG69が、同一の制御指令の更新を互いに競合して実施する事態が発生する。したがって、本実施の形態では、「変数管理者の競合」を回避することによって、複数のUPG69が、同一の制御指令の更新を互いに競合して実施する事態を回避することができる。例えば、図11のUPGスケジュール65では、破線矢印で示すUPG(4)が実行される時間は、UPG(2)が実行される時間と重複しており、UPG(2)とUPG(4)の間で「変数管理者の競合」が生じている。
 競合検出プログラム611は、UPGスケジュール65から「変数管理者の競合」の有無を検出する。具体的には、競合検出プログラム611は、ステップS5で生成された各UPG69から、当該UPG69で利用(宣言)されている出力変数名を抽出する。そして、ステップS5で生成されたUPG69のうち、抽出した出力変数名のうち共通の変数名を利用(宣言)している2以上のUPG69があるか否かを判定する。競合検出プログラム611は、UPGスケジュール65において、これら2以上のUPG69が実行される時間(工程)が同じか(重複するか)否かを判定する。競合検出プログラム611は、これら2以上のUPG69が実行される時間が同じ(重複する)であると判定すると、競合検出プログラム611は、「変数管理者の競合」を検出する。
 変数管理者が競合しているUPGスケジュール65に従って、UPG69が実行される場合は、同一の制御対象に対して同一の出力変数に対応した複数の制御指令が同時に与えられることになり、制御指令が互いに干渉する。この「干渉」が生じると、干渉する制御指令が与えられた制御対象は、いずれの制御指令に従い動作するべきかを判定できなくなり誤動作する可能性がある。
 したがって、本実施の形態では、制御指令の「干渉」を防止するために、スケジュール生成プログラム66によるUPGスケジュール65の生成時に、競合検出プログラム611が「変数管理者の競合」を検出したときは、ユーザ操作などに基き、スケジュール生成プログラム66は「変数管理者の競合」が解消されるようにUPGスケジュール65を生成(変更)する。例えば、図11のUPG(4)が実行される時間を、矢印111Aの時間から矢印111Bの時間に変更される。このように、スケジュール生成ツール64(スケジュール生成プログラム66)は、各UPGスケジュール65からの制御指令が互いに干渉しないように複数のUPGスケジュール65の動作時間を静的に決定することができる。
 したがって、配置ツール63(配置プログラム62)によりUPG69が任意のPLC100に自由に配置されるとしても、スケジュール生成ツール64は「変数管理者の競合」がないUPGスケジュール65を生成するので、PLC100はUPGスケジュール65に従ってUPG69を実行することで、各UPG69からの制御指令が互いに干渉しないように複数のUPG69の間で動作時間を調停しながら実行することができる。
 <G.UPGスケジュール65とストリーム情報87の一例>
 図12は、本実施の形態にかかるUPGスケジュール65の一例を模式的に示す図である。図12のUPGスケジュール65は、例えば、UPG(1)、UPG(2)およびUPG(4)の情報を有し、UPG(1)、UPG(2)およびUPG(4)は、制御指令が設定される同一の出力変数(a,b)を利用する。図12を参照して、UPGスケジュール65は、各UPG69に対応して、当該UPG69が動作する順序に相当する実行の時間651と、UPG69の識別子652、当該UPG69で利用されている出力変数653、および出力変数653に設定される制御指令を転送する通信フレーム20を識別するためのストリームID654を有する。ストリームID654は、対応のUPG毎の各出力変数に対応して定義される。また、UPGスケジュール65は、各UPG69に関連付けてフラグ655を有する。フラグ655は対応のUPG69が動作しない(実行されない)とき0にセットされて、動作(実行)中は1にセットされる。
 図12に示されるように、スケジュール生成プログラム66は、UPGスケジュール65において、複数のUPGスケジュール65を複数のPLC100に分散して配置される場合に、工程の進行に応じて、複数のUPGスケジュール65のそれぞれが順番に動作するように、時間651の動作時間を調停している。
 図12では、ロボット900AのUPG(1)、UPG(2)およびUPG(4)のUPGスケジュール65を示したが、ロボット900BのUPG(3)のUPGスケジュール65も同様の構成を有する。図12のUPGスケジュール65に従えば、各PLC100は、各UPG69からの制御指令が互いに干渉しないように複数のUPG69の間で動作時間を調停することができる。
 UPGスケジュール65が生成されるとき、ストリーム情報生成プログラム67は、制御対象であるフィールド装置90が自己宛の制御指令を識別するための識別情報に相当するストリーム情報87を生成する。
 図13は、本実施の形態にかかるストリーム情報87の一例を模式的に示す図である。図13を参照して、ストリーム情報87は、UPGスケジュール65から抽出された情報であって、UPGスケジュール65の出力変数653のそれぞれに対応して生成される。各変数に対応のストリーム情報87は、当該変数の制御指令を算出するUPG69毎に時間871とストリームID872からなる組を含む。各組は当該UPG69が動作する(実行される)時間871と、当該変数の通信フレーム20のストリームID872を含む。時間871はUPGスケジュール65の時間651に対応し、ストリームID872はUPGスケジュール65のストリームID654に対応する。ストリーム情報87は、制御対象(ロボット900A,900Bのロボットコントローラ90A,90B)に転送(ダウンロードなど)される。
 ストリーム情報87は、フィールド装置90が、いつ、どのUPG69から、どの変数を受信するべきかを判定するための情報、時間871、ストリームID872を含む。時間871は、フィールド装置90に対して複数の制御指令が与えられる場合に、当該複数の制御指令が当該フィールド装置90に与えられる順序を含む概念を示す。この順序は、これら複数の制御指令を出力する複数のUPGスケジュール65の間で調停された動作時間(時間T1-T2、時間T2-T3、時間T3-T4)に基づいている。
 ストリームID872は、UPG69の識別子と制御指令の識別子を含む。制御指令の識別子は、制御指令の種類を含んでおり、この制御指令の種類は、UPG69が動作時に当該UPG69によりアクセスされる変数(より具体的には制御指令が書込みされる変数)の値を含んでいる。
 フィールド装置90は、ストリーム情報87に示された時間871で受信した通信フレーム20のストリームID29を、時間871に対応のストリームID872と照合し、一致しない場合は、フィールド装置90は当該通信フレーム20(すなわち制御指令)を破棄することができる。これにより、フィールド装置90は、ネットワーク11上を送信される通信フレーム20のうちから、UPGスケジュール65に従って指定された時間において、指定されたUPG69が算出した制御指令を有した通信フレーム20を抽出することが可能となる。したがって、本実施の形態では、UPG69は任意のPLC100に自由に配置されるが、その場合であっても、フィールド装置90は制御指令の「干渉」による誤動作を確実に回避できる。
 <H.UPG69の配置>
 図14は、本実施の形態にかかるUPG69の配置処理の一例を示すフローチャートである。図15は、本実施の形態にかかるUPG69に関する情報150の一例を示す図である。図15の情報150は、配置されるべき各UPG69に対応して、その識別子151、当該UPG69の実行に要する実行時間152、および当該UPG69で出力される制御指令の変数153を有する。情報150は、サポート装置500のHDD150に格納される。
 図16は、図15に示す変数153の制御指令に従い動作するフィールド装置90を示す図である。図16では、図15のUPG69の変数153のそれぞれが、いずれのフィールド装置90に与えられる制御指令に対応する変数であるかが例示されている。図14のフローチャートに従えば、図10に示すように、同一の制御対象(ロボットコントローラ90A)に対して制御指令を与えるための複数の制御プログラム(UPG(1)、UPG(2)およびUPG(4))を、複数の制御装置(PLC100)のうちの1つ以上に任意に配置することができる。
 図15および図16を参照して、図14にフローチャートに従う処理を説明する。配置プログラム62が起動されると配置ツール63が動作する。配置ツール63は、実行時間が最大の識別子151に対応のUPG69(ここではUPG-maxという)を、HDD505のUPG69のうちから選択する(ステップT3)。
 配置ツール63は、例えば図15の実行時間152の場合、(t1<t2<t3)に従い、UPG-maxとしてUPG(3)を選択する。
 配置ツール63は、各PLC100に、選択されたUPG-maxをダウンロードし、各PLC100はダウンロードされたUPG-maxを実行し、通信遅延時間を算出(計測)し、算出された通信遅延時間をサポート装置500に送信する(ステップT5)。通信遅延時間を算出後に、PLC100はダウンロードされたUPG-maxを削除する。
 例えば、通信遅延時間の算出として、各PLC100にUPG-maxをダウンロードした時の各変数の通信遅延時間の最大値を算出する。ここでは、ネットワーク11を介した隣接するデバイス間の通信遅延時間は1stepとする。
 PLC100AにUPG-maxをダウンロードした場合、UPG(3)が算出する変数a3、b3およびc3の通信遅延時間は、それぞれ、a3:3steps、b3:5steps、c3:6stepsであるので、6stepsが抽出される。
 PLC100BにUPG-maxをダウンロードした場合、UPG(3)が算出する変数a3、b3およびc3の通信遅延時間は、それぞれ、a3:4steps、b3:4steps、c3:5stepsであるので、5stepsが抽出される。
 PLC100CにUPG-maxをダウンロードした場合、UPG(3)が算出する変数a3、b3およびc3の通信遅延時間は、それぞれ、a3:5steps、b3:3steps、c3:4stepsであるので、5stepsが抽出される。
 PLC100DにUPG-maxをダウンロードした場合、UPG(3)が算出する変数a3、b3およびc3の通信遅延時間は、それぞれ、a3:6steps、b3:4steps、c3:3stepsであるので、6stepsが抽出される。
 配置ツール63は、各PLC100から受信した通信遅延時間のうちから、最大値が最小であるPLC100を決定する(ステップT7,T9)。上記の例に従えば、配置ツール63は、PLC100BとPLC100Cを抽出する。このように複数のPLC100が抽出された場合は、配置ツール63は、例えばメモリの空き領域の大きい方をUPG-maxのダウンロード(配置)先と決定する。配置ツール63は、例えば、PLC100BをUPG-maxのダウンロード先と決定する。
 配置ツール63は、決定されたPLC100にUPG-maxをダウンロードする(ステップT11)。このように、UPG69がダウンロードされるPLC100を決定すること、または決定されたPLC100のUPG69をダウンロードすることをUPG配置と呼ぶ。
 配置ツール63は、情報150の情報151が示すUPG69のうち、UPG配置が実施されていない、いわゆる残りのUPG69があるか否かを判定する(ステップT13)。配置ツール63は、残りのUPG69があると判定すると(ステップT13でYES)、ステップT3に戻り、残りのUPG69についてステップT3以降の処理を実施する。配置ツール63は、残りのUPG69はないと判定すると(ステップT13でNO)、処理を終了する。
 図14の処理によれば、HDD505のUPG69を、最適なPLC100にダウンロードできる。すなわち、その実行時間が長いUPG69から順番に、その通信遅延時間が最短となるPLC100を配置することができる。なお、本実施の形態では、通信遅延時間に基づきUPG69のダウンロード先のPLC100を決定したが、決定する方法は通信遅延時間に基づく方法に限定されない。
 <I.フィールド装置90とPLC100の機能構成>
 図17は、本実施の形態にかかるフィールド装置90が備える機能を模式的に示す図である。図17の機能は、ロボットコントローラ90A,90Bも同様に備える。
 図17を参照して、フィールド装置90は、アプリケーションプログラム82を実行するアプリ処理部901、スケジューラ84に対応のスケジューリング処理部902、アプリケーションプログラム82によりアクセス(読出または書込)されるデータ(制御指令またはフィールド値を含む)の変数を管理する変数管理処理部903、フィールド装置90と外部機器との通信を通信プロトコルに従い通信プログラム83を実行するための通信基本処理部906を含む。変数管理処理部903は変数管理モジュール85に対応する。
 変数管理処理部903は、ストリーム処理プログラム89を実行する。変数管理処理部903は、ストリーム情報87に基づき自己宛の制御指令(変数)のストリーム(通信フレーム20)を検出して受信する受信変数/ストリーム確認処理部904、および測定(検出)したフィールド値のストリーム(通信フレーム20)を生成するストリーム生成処理部905、およびストリーム情報登録部910を含む。ストリーム情報登録部910は、ストリーム情報87をメモリ92に登録(格納)する。通信プログラム83に対応の通信基本処理部906は、ストリーム(通信フレーム20)を送受信するための送信処理部907および受信処理部908、ならびに時刻同期プログラム831に対応の時刻同期処理部909を含む。
 図18は、本実施の形態にかかるPLC100が備える機能を模式的に示す図である。図18を参照して、PLC100は、ダウンロード(配置)されたUPG69を格納するためのUPGライブラリ170、スケジューラ123に対応するスケジューリング処理部171、変数管理処理部173および通信プログラム127に対応の通信基本処理部176を含む。
 スケジューリング処理部171は、UPG69を含む各種アプリケーションプログラムを周期的に実行するよう実行タイミングを調整する。スケジューリング処理部171は、UPGスケジュール65に従いUPGライブラリ170のUPG69を周期的に実行するよう実行タイミングを調整するUPGスケジューリング処理部172を含む。UPGスケジューリング処理部172は、管理者切替プログラム128に対応の管理者切替部180を含む。管理者切替部180は、変数管理者の切替の処理を実施する。
 変数管理処理部173は、ストリーム処理プログラム129を実行する。変数管理処理部173は、ストリーム情報87に基づき自己宛のストリーム(通信フレーム20)を検出して受信する受信変数/ストリーム確認処理部174、およびUPG69を実行することで算出された制御指令のストリーム(通信フレーム20)を生成するストリーム生成処理部175を含む。通信基本処理部176は、ストリーム(通信フレーム20)を送受信するための送信処理部177および受信処理部178、および時刻同期プログラム121に対応の時刻同期処理部179を含む。
 <J.UPGが変数を管理する態様>
 本実施の形態では、システム1のUPG69による変数管理者のモードは、(静的固定)、(静的変動)および(動的変動)のモードを含む。ユーザは、サポート装置500を操作することにより、いずれか1つのモードを指定することができる。各モードについて説明する。
 (j1.静的固定モード)
 静的固定のモードでは、ある1の出力変数は、1つのUPG69により書き換えられるようUPGスケジュール65が静的に設定される。図19は、本発明の実施の形態にかかる静的固定モードを模式的に説明する図である。図20は、本発明の実施の形態にかかる静的固定モードの処理の一例を示すフローチャートである。ここでは、UPG691は、PLC100Aに接続されたロボット900Aのアーム位置の出力変数を、UPGスケジュール65に従い、Pick、SupportおよびPlaceの順に制御周期に同期して算出し、算出された出力変数の値(制御指令)の通信フレーム20を生成し、ロボットコントローラ90Aに送信する。また、UPG692は、PLC100Bに接続されたロボット900BにManufactureのアーム位置の変数に対応の制御指令をUPGスケジュール65に従い、制御周期に同期して算出し、ロボット900Bのロボットコントローラ90Bに送信する。図19では、作業Cおよび作業Dのそれぞれの制御指令を算出するUPG69は、算出した制御指令を、PLC100Cおよび100Dそれぞれに接続されたロボットのロボットコントローラに与える。
 本実施の形態では、UPG生成プログラム68が起動されて、UPG生成プログラム68によりUPG69が生成される場合に、スケジュール生成プログラム66は、指定された静的固定モードに従う処理を実施する。
 図20を参照して、UPG生成プログラム68により、ユーザ操作に従いUPG69(例えば、UPG(1)~UPG(4))が生成されるとともに、スケジュール生成プログラム66によりUPGスケジュール65が、およびストリーム情報生成プログラム67によりストリーム情報87がそれぞれ生成される(ステップS10)。このとき、競合検出プログラム611が起動されて、起動された競合検出プログラム611は、UPGスケジュール65に基づき、変数管理者の競合があるか否かを判定する(ステップS13)。
 具体的には、競合検出プログラム611は、ロボット900Aのアームの位置を示す制御指令(指令値)が設定される同一出力変数の変数管理者が競合するか(UPG(1)、UPG(2)およびUPG(4)を含むUPG691が並行して複数実行される)否かを判定する(ステップS13)。具体的には、競合検出プログラム611は、情報150のUPG691の変数153の全ての変数について変数管理者が競合するか否かを判定する。いずれかの出力変数について変数管理者が競合すると判定されると(ステップS13でNO)、ステップS10に移行し、変数管理者の競合を回避するようにUPGプログラム69、UPGスケジュール65およびストリーム情報87が生成される。
 競合検出プログラム611は、全ての出力変数について変数管理者の競合はないと判定すると(ステップS13でYES)、UPG69とUPGスケジュール65をPLC100にダウンロードし、ストリーム情報87をロボットコントローラ90A,90Bを含むフィールド装置90に配置(ダウンロード)する(ステップS15)。
 (j2.静的変動モード)
 静的変動モードでは、ある1つの変数は複数のUPG69によって書き換えられる。静的変動モードに従うUPGプログラム69の作成、ユーザ操作に従いUPGスケジュール65およびストリーム情報87を生成する方法は、図9に示された処理と同様であるので、説明は繰り返さない。
 (j3.動的変動モード)
 上記の静的固定モードおよび静的変動モードでは、UPGスケジュール65が生成されたときに取得されるストリーム情報87が、各フィールド装置90に予め設定されて(静的に設定されて)、設定されたストリーム情報87に基きフィールド装置90は自己宛のストリームIDに一致する通信フレーム20を受信する。
 これに対して、動的変動モードでは、各フィールド装置90は静的に設定されるストリーム情報87を有しない。具体的には、フィールド装置90は、UPGスケジュール65に従いPLC100において動作中において、UPGスケジューリング処理部172によるUPG69の切替え(すなわち、変数の変数管理者の動的切替え)に従って、管理者切替部180が出力する管理者切替の通知31に基づき、動的ストリーム情報870を取得する。動的変動モードでも上記の「調停手段」が提供されて、この「調停手段」は、管理者切替部180を含むUPGスケジューリング処理部71を含んで構成される。
 動的変動のモードでは、ある1の変数は複数のUPG69により書換え可能である。図21は、本発明の実施の形態にかかる動的変動モードを模式的に説明する図である。図22は、本発明の実施の形態にかかる動的変動モードのタイミングチャートである。図21を参照して、PLC100Aに接続されたロボット900AにPick、SupportおよびPlaceの例えばアーム位置の変数に対応の制御指令を出力(書換)するUPG69として、UPG(1)、UPG(2)およびUPG(4)が生成される。PLC100Bに接続されたロボット900BにManufactureのアーム位置の変数に対応の制御指令を出力(書換)するUPG69として、UPG(3)が生成される。図22は、図21のシステム1のために生成されたUPGスケジュール65と、UPG69が動作中にフィールド装置90に送信されるストリーム情報87の一例が模式的に示される。
 図22を参照して、動的変動モードにおいて、UPGスケジュール65に従う変数管理者切替のスケジューリングを説明する。まず、UPG(1)の実行(動作)が完了後、次位のUPG69を実行するための実行指示211を生成する(図22のステップ(1))。この実行指示211は、次位のUPG69の識別子652および次位のUPG69の実行開始時間221を含む。本実施の形態では「次位のUPG」とは、あるUPGの実行が完了したときに、次に実行されるべきUPGを示す。
 PLC100は、次位のUPG69が自PLC100内のUPGライブラリ170にあるときは、タイマ160が実行開始時間221を計時したとき、実行指示211に従い次位のUPG69を実行する(図22のステップ(2))。
 PLC100は、次位のUPG69が自PLC100内のUPGライブラリ170にない、すなわち次位のUPG69が他のPLC100が有すときは、実行指示211を当該他のPLC100に、例えばマルチキャストアドレスで通知する。他のPLC100では、受信した実行指示211に従い、実行開始時間221を計時したとき、自PLC100のUPGライブラリ170内の次位のUPG69を実行する(図22のステップ(3))。
 本実施の形態では、複数の関連するUPG69の実行完了を待って実行されるべき次位のUPG69は、複数の関連UPG69の実行が完了したときに実行される。具体的には、PLC100は、全ての関連UPG69に対応の実行指示211を受信した後、受信した実行指示211に従い、次位のUPG69を実行する(図22のステップ(4))。この場合、次位のUPG69を実行開始する時間は、受信した各実行指示211が指定する実行開始時間221のうち、最も遅い時間に対応する。
 PLC100は、実行するべきUPG69を次位のUPG69に切替える時に、管理者切替の通知31をネットワーク11上にマルチキャストで送信する。また、通知31を送信するとき、PLC100は切替後の1のUPG69(次位のUPG69)が出力する制御指令を有した通信フレーム20を識別するためのストリーム情報87と、そのストリームID29を持つストリーム(通信フレーム20)の受信を開始する時間の情報をフィールド装置90に送信する。フィールド装置90(ロボットコントローラ90A,90Bを含む)は通知31を受信したときに、PLC100から受信するストリーム情報87を受信し、切替後にネットワーク11上を送信される通信フレーム20のうちから、ストリーム情報に基き、自己宛ての制御指令を有した通信フレーム20を選択的に受信することができる。
 図23は、本実施の形態にかかる動的変動モードのための支援ツールの処理を模式的に示すフローチャートである。図23の処理は、図9のステップS9をステップS9aに変更している。図23の他の処理は図9と同様であるので説明は繰り返さない。
 ステップS9aでは、ステップS1~ステップS7で生成されたUPG69と静的に設定されたUPGスケジュール65がPLC100にダウンロードされる(ステップS9a)。
 (j3-1.実行前の処理)
 図24は、本実施の形態にかかる動的変動モードにおけるUPG実行前の処理の一例を示すフローチャートである。図24を参照して、例えばシステム1の起動時などシステム1でUPG69が実行される前に、各PLC100は配置ツール63により決定されたUPG69とUPGスケジュール65を受信し(ステップS20)、受信したUPG69をUPGライブラリ170に格納するとともに、UPGスケジュール65をストレージ119に格納する(ステップS21,S22)。
 (j3-2.UPG69を実行開始時の処理)
 図25は、本実施の形態にかかる動的変動モードにおけるUPG実行開始時の処理の一例を示すフローチャートである。図25を参照して、動的変動モードにおいて、PLC100が起動されると、PLC100は初期実行UPG69が、UPGスケジュール65に登録されているか否かを判定する(ステップS23)。具体的には、演算処理部110は、UPGスケジュール65から初期実行UPGフラグをもとに最初に実行すべきUPG69を検索する。演算処理部110は、検索により最初に実行すべきUPG69がUPGスケジュール65に登録されていないと判定すると(ステップS23でNO)、図25の処理を終了する。
 一方、演算処理部110は、初期実行UPG69はUPGスケジュール65に登録されていると判定すると(ステップS23でYES)、初期実行UPG69を実行対象のUPG69と決定し(ステップS25)、UPGスケジューリング処理部172は当該UPG69の実行開始時間221を算出する(ステップS27)。例えば、実行開始時間221は、(実行開始時間=タイマ160が出力する現在時間+UPG69の実行間隔)に基づき算出される。ここで、UPG69の実行間隔は、制御周期に同期した所定周期に対応する間隔である。
 UPGスケジューリング処理部172は、ステップS27で算出された実行開始時間221に初期実行UPG69を実行開始させるための実行指示211を生成し(ステップS29)は、生成された実行指示211をスケジューリング処理部171に登録する(ステップS31)。
 管理者切替部180は、実行されるべきUPG69の切替えがあったことを示す管理者切替えの通知31を有する通信フレーム20を生成し、通信基本処理部176を介してネットワーク11上にマルチキャストで送信する(ステップS32)。これにより、PLC100は初期実行UPG69を実行するとき、変数管理者の切替えがあったことをシステム1の全てのデバイスに通知することができる。また、PLC100は、制御対象であるフィールド機器90に、特定のストリーム情報の通信フレーム20を、実行指示211に含まれる実行開始時間221の時間から処理を開始すべきことを通知する。
 スケジューリング処理部171は、タイマ160が、当該登録された実行指示211の実行開始時間221を計時したことを検出すると、初期実行UPG69を実行させるために、UPGライブラリ170の初期実行UPG69に実行命令を通知する(ステップS33)。
 (j3-3.PLC100が内部から実行指示を受付けるケース)
 図26は、本実施の形態にかかるUPG実行中の処理の一例を示すフローチャートである。図26を参照して、PLC100が、自PLC100のUPGライブラリ170のUPG69を実行して、その実行完了に伴い実行指示211が出力される場合を説明する。
 PLC100がUPG69を実行時において、UPGスケジューリング処理部172はスケジューリング処理部171からUPG69の実行完了の通知を受信するか否かを判定する(ステップS35)。スケジューリング処理部171は実行中のUPG69の実行完了の通知を受信しないと判定する(ステップS35でNO)間は、ステップS35が繰り返される。一方、スケジューリング処理部171は、実行完了の通知を受信したと判定すると(ステップS35でYES)、UPGスケジューリング処理部172は、UPGスケジュール65を検索し、検索の結果に基づき、UPGスケジュール65に次位のUPG69が登録されているか否かを判定する(ステップS37)。
 UPGスケジューリング処理部172は、UPGスケジュール65に次位のUPG69が登録されていないと判定すると(ステップS37でNO)、ユーザまたは他のPLC100に異常を通知する(ステップS57)。その後、図26の処理を終了する。一方、UPGスケジューリング処理部172は、UPGスケジュール65に次位のUPG69が登録されていると判定すると(ステップS37でYES)、次位のUPG69を実行対象のUPG69として決定する(ステップS39)。その後、スケジューリング処理部171は、ステップS27およびS29と同様に実行開始時間221を算出し、算出された実行開始時間221を含む実行指示211を生成する(ステップS41,S43)。
 UPGスケジューリング処理部172は、実行対象に決定したUPG69(次位のUPG69)がUPGライブラリ170に有るか否かを判定する(ステップS45)。具体的は、UPGスケジューリング処理部172は、当該UPG69の識別子652に基づきUPGライブラリ170を検索し、検索の結果に基づき当該判定を実施する(ステップS45)。この場合、次位のUPG69として、UPGライブラリ170からUPG(2)が検索される。
 UPGスケジューリング処理部172は、図12のUPGスケジュール65に従い、UPG(1)に続く次位のUPG(2)は自PLC100内のUPGライブラリ170に有ると判定し(ステップS45でYES)、ステップS47に移行する。一方、UPGスケジューリング処理部172は、次位のUPG(2)は自PLC100内のUPGライブラリ170にないと判定すると(ステップS45でNO)、ステップS49に移行する。
 UPGスケジューリング処理部172は、次位のUPG(2)の実行指示211をスケジューリング処理部171に登録し(ステップS47)、ステップS49に移行する。これにより、ステップS31およびS32と同様に、スケジューリング処理部171は、登録された実行指示211に基づき、実行指示211が示す実行開始時間221になると、UPGライブラリ170の次位のUPG(2)に実行命令を通知する。
 ステップS49では、UPGスケジューリング処理部172は、ステップS45の判定結果に基き、次位のUPG(2)は他のPLC100に有るか否かを判定する(ステップS49)。UPGスケジューリング処理部172は、次位のUPG(2)は他のPLC100にない(すなわち、自PLC100のUPGライブラリ170に有る)と判定したとき(ステップS45でNO、ステップS49でNO)、ステップS55に移行する。ステップS55では、管理者切替部180は、ステップS33と同様に管理者切替の通知31を有した通信フレーム20を生成し、通信基本処理部176を介して、ネットワーク11上にマルチキャストにより送信する。
 UPGスケジューリング処理部172は、次位のUPG(2)は自PLC100内のUPGライブラリ170にあると判定すると(ステップS45でYES、ステップS49でNO)、まず、UPG(2)は他のPLC100に有ると判定されて(ステップS49でYES)、変数管理処理部173は、上記の管理者切替の通知31が送信されたとき(ステップS50)、ストリーム情報87を格納する通信フレーム20を生成し(ステップS51)、生成した通信フレーム20をネットワーク11上に送信する(ステップS53)。
 (j3-4.PLC100が他のPLC100から実行指示を受付けるケース)
 図27は、本実施の形態にかかるUPG実行中の処理の一例を示すフローチャートである。図27を参照して、PLC100が、他のPLC100から次位のUPG69の実行指示211を受付ける場合を説明する。
 通信基本処理部176は、ネットワーク11を介して外部のPLC100から実行指示211を受信するか否かを判定する(ステップS60)。通信基本処理部176は、ネットワーク11を介して実行指示211を受信しないと判定するときは(ステップS60でNO)、ステップS60を繰返す。
 通信基本処理部176は、ネットワーク11を介して実行指示211を受信したと判定すると(ステップS60でYES)、UPGスケジューリング処理部172は、受信した実行指示211の識別子652に基きUPGライブラリ170を検索し、検索結果に基き、次位のUPG69がUPGライブラリ170に登録されているかを判定する(ステップS63)。
 UPGスケジューリング処理部172は、次位のUPG69はUPGライブラリ170に登録されていないと判定すると(ステップS63でNO)、実行指示211をスケジューリング処理部171に登録(出力)しない(ステップS67)、次位のUPG69はUPGライブラリ170に登録されていると判定すると(ステップS63でYES)、実行指示211をスケジューリング処理部171に登録する(ステップS65)。
 図27の処理によれば、マルチキャストで送信された実行指示211を複数のPLC100が受信した場合、実行指示211が示す次位のUPG69が自己のUPGライブラリ170にあるPLC100においてのみ、当該実行指示211に従い次位のUPG69を実行することが可能となる。
 (j4.実行指示と変数管理者の切替えの連動)
 図28は、本実施の形態にかかる動的変動モードにおける変数管理者切替えの処理例を模式的に示す図である。図28では、PLC100A、100Bおよび100CがUPG69を実行可能であり、PLC100AのUPGライブラリ170はUPG(1)とUPG(2)を有し、PLC100BのUPGライブラリ170はUPG(4)を有し、PLC100CのUPGライブラリ170はUPG(4)を有しない。図12に示すようにUPGスケジュール65では、時間651によってUPG(1)→UPG(2)→UPG(4)の実行順序が指定されている。
 動的変動モードにおいて、PLC100AにおいてUPG(1)は、実行完了すると完了通知220を出力し、UPGスケジューリング処理部172は当該完了通知220を受けると、UPGスケジュール65のUPG(1)のフラグ655を「0」にセットする(ステップ(1))。
 スケジューリング処理部171は、UPGスケジュールUPGスケジュール65に従い次位のUPG(2)を特定し、特定した次位のUPG(2)の実行指示211を生成する。UPGスケジューリング処理部172は、次位のUPG(2)がPLC100AのUPGライブラリ170にある場合は、実行指示211をスケジューリング処理部171に登録する(ステップ(2))。
 スケジューリング処理部171は、登録された実行指示211が示す実行開始時間221になったとき、UPGライブラリ170の次位のUPG(2)に実行命令を出力する(ステップ(3))。
 一方、次位のUPG(2)はUPGライブラリ170にない場合は、UPGスケジューリング処理部172は実行指示211をネットワーク11上にマルチキャストで送信する(ステップ(4))。
 PLC100BおよびPLC100Cは、ネットワーク11上の実行指示211を受信する。PLC100BおよびPLC100Cのうち、PLC100Bは、受信した実行指示211が有する識別子652に対応のUPG(2)(次位のUPG69)を自己のUPGライブラリ170に有ると判定する。PLC100Bは、PLC100Aと同様に、受信した実行指示211が示す実行開始時間221になったとき、対応のフラグ655を「1」にセットして、UPGライブラリ170の次位のUPG(2)に実行命令を出力する(ステップ(5))。一方、PLC100Cは、ネットワーク11を介して実行指示211を受信するが、実行指示211が有する識別子652に対応の次位のUPG(2)を有しないので、PLC100Cは、マルチキャストされた実行指示211を受信しても、当該実行指示211に従った動作を実施しない(ステップ(7))。
 また、PLC100Aの管理者切替部180は、ステップ(3)またはステップ(4)を実施後に、管理者切替の通知31の通信フレーム20を生成しマルチキャストでネットワーク11上に送信する(ステップ(6))。
 図28の処理によれば、UPGスケジュール65に従い、UPGスケジューリング処理部172が次位のUPG(2)の実行指示211を出力するときは、管理者切替部180が管理者切替の通知31をネットワーク11上にマルチキャストで送信する。これにより、他のデバイス(PLC100とフィールド装置90)は、管理者切替えの通知31を受信することで、他のPLC100(図28でPLC100A)で実行されるUPG69が次位のUPG69(図28でUPG(2))に切替えられたことを検出することができる。
 <K.管理者切替の通知31とデバイスの動作>
 図29は、本実施の形態にかかる管理者切替の通知31とデバイスの動作の関連性を表形式で示す図である。図29の表は、第1ケース、第2ケースおよび第3ケースのそれぞれに対応して、通知31の内容とデバイス(フィールド装置90)が予め有する情報および動作(挙動)からなる組を示す。図29を参照して、第1ケース、第2ケースおよび第3ケースの通知31は、いずれも、次位のUPG69の実行開始時間291と出力変数のデータ(制御指令)の通信に利用するストリームID292を有する。
 図30は、本実施の形態のUPGスケジュールの他の例を模式的に示す図である。サポート装置500のスケジュール生成プログラム66は、ユーザ操作に従い、動的変動モードに対応した図30のUPGスケジュール65Aを生成する。生成されたUPGスケジュール65Aは、各PLC100にダウンロードされる。
 図30を参照して、UPGスケジュール65Aは、各UPG69について情報を格納する。UPG69の情報は、UPGの実行順序に対応するUPG番号666、UPG69の識別子652、UPGスケジュール65Aに従い最初に実行されるべきUPG69を指定するための初期実行フラグ667、前UPG番号668、後UPG番号669、出力変数653およびストリームID654を含む。前UPG番号668および後UPG番号669は、それぞれ、対応のUPG69の前および後に実行されるUPG69のUPG番号666を示す。以下に動的変動モードにおける図29の第1ケース、第2ケースおよび第3ケースをそれぞれ説明する。
 (k1.第1ケース)
 図31および図32は、それぞれ、本実施の形態にかかる動的変動モードの(第1ケース)に従うフィールド装置90の処理の概要を示すフローチャートである。図31は、本実施の形態にかかる(第1ケース)に従う処理の概要を示す。図31を参照して、フィールド装置90のストリーム情報登録部910は、通信基本処理部906を介して、管理者切替の通知31を受信するか否かを判定する(ステップS70)。
 ストリーム情報登録部910は、通知31を受信しないと判定する場合(ステップS70でNO)、ステップS70の判定を繰返すが、通知31を受信したと判定する場合(ステップS70でYES)、ステップS71に移行する。
 ストリーム情報登録部910は、受信した通知31の実行開始時間291とストリームID292を、動的ストリーム情報870としてメモリ92に格納する(ステップS71)。
 このように、フィールド装置90にストリーム情報87が静的に設定されない場合でも、フィールド装置90は、UPG69が実行中に管理者切替の通知31に受信することにより、動的ストリーム情報870を取得することができる。
 図32を参照して、図31の処理により取得された動的ストリーム情報870に基いた処理の一例を説明する。まず、フィールド装置90の通信基本処理部906は、ストリームID29を格納した通信フレーム20を受信するか否かを判定し(ステップS73)、当該通信フレーム20を受信していないと判定する(ステップS73でNO)間は、ステップS73の処理を繰返す。
 一方、通信基本処理部906は、ストリームID29を格納した通信フレーム20を受信したと判定すると(ステップS73でYES)、受信変数/ストリーム確認処理部904は、受信した通信フレーム20のストリームID29を動的ストリーム情報870のストリームID292と照合し、両者は一致しているか否かを判定する(ステップS75)。
 受信変数/ストリーム確認処理部904は、受信した通信フレーム20のストリームID29は、動的ストリーム情報870のストリームID292と不一致と判定すると(ステップS75でNO)、当該通信フレーム20を破棄し(ステップS83)、処理を終了する。
 一方、受信変数/ストリーム確認処理部904は、受信した通信フレーム20のストリームID29は動的ストリーム情報870のストリームID292と一致すると判定すると(ステップS75でYES)、当該通信フレーム20を処理する。
 具体的には、受信変数/ストリーム確認処理部904は、タイマ99が計時する現在時間は、動的ストリーム情報870の実行開始時間291以後の時間を示すか(すなわち、現在時間は実行開始時間291を経過しているか)を判定する(ステップS77)。
 受信変数/ストリーム確認処理部904は、現在時間は実行開始時間291を経過していないと判定すると(ステップS77でNO)、実行開示時間前の受信である旨を、通信フレーム20を利用してPLC100に通知する(ステップS81)。
 一方、受信変数/ストリーム確認処理部904は、現在時間は実行開始時間291を経過していると判定すると(ステップS77でYES)、通信フレーム20のペイロード26の制御指令を取得して入力データ944に設定する(ステップS79)。これにより、プロセッサ91は入力データ944の制御指令に従いサーボモータなどを動作させる。
 (k2.第2ケース)
 図33は、本実施の形態にかかる(第2ケース)に従うフィールド装置90の処理の概要を示すフローチャートである。図34は、本実施の形態にかかる(第2ケース)に従うストリーム情報の一例を示す図である。上記に述べた第1ケースでは、フィールド装置90にはストリーム情報87は静的に設定されなかった(すなわち、UPG69の実行に先立ってダウンロードされない)が、第2ケースでは、フィールド装置90は、図34に示すように、ストリーム情報87のうちストリームID872のみが静的に設定されている。
 図33を参照して、デバイスのストリーム情報登録部910は、通信基本処理部906を介して、管理者切替の通知31を受信するか否かを判定し(ステップS70)、通知31を受信しないと判定する場合(ステップS70でNO)、ステップS70の判定を繰返すが、通知31を受信したと判定する場合(ステップS70でYES)、ステップS70aに移行する。
 ストリーム情報登録部910は、受信した通知31が示すストリームID292は、静的に(予め)設定されている図34のストリームID872と一致するかを判定する(ステップS70a)。ストリーム情報登録部910は、不一致を判定すると(ステップS70aでNO)、通知31の送信元のPLC100宛に異常通知を送信する(ステップS70b)。
 一方、ストリーム情報登録部910は、受信した通知31が示すストリームID292は図34のストリームID872と一致すると判定すると(ステップS70aでYES)、ステップS71において、一致した図34のストリームID872に通知31の実行時間291を対応付けてメモリ92に格納する(ステップS71)。これにより動的ストリーム情報870(実行時間291およびストリームID872)がメモリ92に格納される。
 第2ケースのように、フィールド装置90は、ストリームID872のみが静的に設定される場合であっても、ネットワーク11を介してPLC100から送信された管理者切替の通知31を受信することにより、動的ストリーム情報870を取得することができる。
 図33の処理により取得された動的ストリーム情報870に基いた、フィールド装置90における通信フレーム20の受信処理は、図32の処理と同様であるから説明は繰返さない。
 (k3.第3ケース)
 図35は、本実施の形態にかかる(第3ケース)に従うデバイスの処理を示すフローチャートである。図36は、本実施の形態にかかる(第3ケース)に従うストリーム情報の一例を示す図である。第3ケースでは、フィールド装置90のメモリ92には、図36に示す1以上のストリームID872と、1以上のストリームID872のそれぞれに対応した順番873が格納される。順番873は、対応のストリームID872の通信フレーム20がネットワーク11上を転送される相対的な順番を示す。
 図35を参照して、デバイスのストリーム情報登録部910は、通信基本処理部906を介して、管理者切替の通知31を受信するか否かを判定し(ステップS70)、通知31を受信しないと判定する場合(ステップS70でNO)、ステップS70の判定を繰返すが、通知31を受信したと判定する場合(ステップS70でYES)、ステップS70aに移行する。
 ストリーム情報登録部910は、受信した通知31が示すストリームID292は図34のストリームID872と一致するかを判定し(ステップS70a)、不一致と判定すると(ステップS70aでNO)、通知31の送信元のPLC100宛に異常通知を送信する(ステップS70b)。
 一方、ストリーム情報登録部910は、受信した通知31が示すストリームID292は図34のストリームID872と一致すると判定すると(ステップS70aでYES)、ステップS70cに移行する。
 ステップS70cにおいて、ストリーム情報登録部910は、PLC100からのストリームID292(通知31)を受信する順番が、図36の順番873に従う順番(例えば、昇順)に整合しているかを判定する。例えば、受信した順番が、順番873の1→3→2などであった場合、ストリーム情報登録部910は、ストリームID292の受信順番が、図36の順番873に従う順番に整合していないと判定し(ステップS70cでNO)、ステップS70bに移行する。
 一方、ストリーム情報登録部910は、PLC100からの通知31(ストリームID292)の受信順番が、図36の順番873に従っていると判定すると(ステップS70cでYES)、ステップS71に移行する。ステップS71では、一致した図36のストリームID872に通知31の実行時間291を対応付けてメモリ92に格納する(ステップS71)。これにより動的ストリーム情報870(実行時間291およびストリームID872)がメモリ92に格納される。
 第3ケースのように、フィールド装置90は、ストリームID872のみを格納する場合であっても、その順番873に従い受信する通知31に基づき動的ストリーム情報870を取得することができる。
 図35の処理により取得されたストリーム情報87に基いた、デバイスにおける通信フレーム20の受信処理は、図32の処理と同様であるから説明は繰返さない。
 <L.変数とその管理方法>
 UPG69がアクセスする変数と、その管理方法を説明する。図37は、本実施の形態にかかる変数管理の概念を模式的に示す図である。図37を参照して、UPG69が実行時にアクセスする変数の管理について説明する。図37では、第1のPLC100のUPGライブラリ170はUPG(1)とUPG(2)を有し、第2のPLC100のUPGライブラリ170はUPG(4)を有する。第2のPLC100の変数管理処理部173はUPG69のローカル変数(3)を入力データ134または出力データ135として管理する。実行中にUPG69がアクセス(読込/書込)する変数のデータは、変数管理処理部173によって入力データ134または出力データ135として管理される。変数管理処理部173が管理するデータの変数は、各UPG69のローカル変数と、複数のUPG69がアクセス可能なグローバル変数とを含む。あるUPG69は、他のUPG69のローカル変数にアクセスすることはできない(禁止される)。あるUPG69は、他のUPG69があるグローバル変数にアクセスしていない場合、当該グローバル変数にアクセスすることができるが、他のUPG69があるグローバル変数にアクセスしている場合に、当該グローバル変数にアクセスすることはできない(禁止(5))。図37では、UPG(2)は、UPG(1)のローカル変数(1)をアクセスすることはできず(禁止(4))、同様に、UPG(1)はUPG(2)のローカル変数(2)をアクセスすることはできない。
 変数管理処理部173は、UPG69からローカル変数のアクセス要求を受付けると、受付けたアクセス要求に従いローカル変数のデータをアクセスする(ローカル変数アクセス(1))。また、変数管理処理部173は、UPG69からグローバル変数のアクセス要求を受付けると、他のUPG69が実行中でないとき、受付けたアクセス要求に従いグローバル変数のデータをアクセスする(グローバル変数アクセス(2))。例えば、変数管理処理部173は、フラグ655に基き、他のUPG69が実行中であるか否かを判定することができる。なお、UPG69からのローカル変数およびグローバル変数へのアクセス要求は、いずれもスケジューリング処理部172を経由せずに変数管理処理部173に与えられる。
 変数管理処理部173は、UPG(1)またはUPG(2)の実行中にグローバル変数アクセス(2)によりグローバル変数の書換え(書込み)が実施される都度、第1のPLC100と第2のPLC100との間でグローバル変数の同期(処理(3))を実施する。具体的には、同期処理では、第1のPLC100の変数管理処理部173は、第2のPLC100のグローバル変数の値が、第1のPLC100のグローバル変数の書換え後の値を示すように書換えの要求を送信する。この書換えの要求は、グローバル変数は制御指令が設定される変数であるとき、ペイロード26に書換え後のグローバル変数の値(制御指令)を有した図6の通信フレーム20が第1のPLC100からネットワーク11上に送信される。第2のPLC100の変数管理処理部173は、受信した通信フレーム20のペイロード26の値を自己のグローバル変数に書込む。これにより、UPG(1)、UPG(2)およびUPG(4)は、異なるPLC100にロード(配置)されるとしても、グローバル変数の値が書換え(書込み)される都度、書換え後の同じ値を参照(読出)することができる。
 <M.コンピュータプログラム>
 配置ツール63およびスケジュール生成ツール64を含む設定ツール600は、図5のサポート装置500のCPU502がHDD505などのメモリに格納されるプログラムを実行することにより提供される構成を例示したが、これらの提供される構成の一部または全部を、専用のハードウェア回路(たとえば、ASIC(Application Specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)など)を用いて実装してもよい。あるいは、サポート装置500の主要部を、汎用的なアーキテクチャに従うハードウェアを用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 また、サポート装置500は、CPU502のようなプロセッサを複数個備えてもよい。この場合は、図5に示す各部は、複数のプロセッサにより実行することが可能である。また、CPU502が複数のコアを含む場合は、図5に示す各部は、CPU502内の複数のコアにより実行することが可能である。
 PLC100は、CPUに相当するプロセッサ112、HDD、ROM、RAM等を含んで構成されるストレージ119を含む。ストレージ119は、PLC100が実行するプログラムおよびデータを格納する。PLC100がストレージ119のプログラムを実行することにより提供される構成の一部または全部を、専用のハードウェア回路(たとえば、ASICまたはFPGAなど)を用いて実装してもよい。あるいは、PLC100の主要部を、汎用的なアーキテクチャに従うハードウェアを用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOSを並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 また、PLC100は、CPUのようなプロセッサを複数個備えてもよい。この場合は、図3に示す各プログラムは、複数のプロセッサにより実行することが可能である。また、このCPUが複数のコアを含む場合は、図3に示す各プログラムは、CPU内の複数のコアにより実行することが可能である。
 また、フィールド装置90は、CPUに相当するプロセッサ91、HDD、ROM、RAM等を含んで構成されるメモリ92を含む。メモリ92は、プロセッサ91が実行するプログラムおよびデータを格納する。プロセッサ91がメモリ92のプログラムを実行することにより提供される構成の一部または全部を、専用のハードウェア回路(たとえば、ASICまたはFPGAなど)を用いて実装してもよい。あるいは、PLC100の主要部を、汎用的なアーキテクチャに従うハードウェアを用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOSを並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 また、プロセッサ91は、CPUのようなプロセッサを複数個備えてもよい。この場合は、図4に示す各プログラムは、複数のプロセッサにより実行することが可能である。また、このCPUが複数のコアを含む場合は、図4に示す各プログラムは、CPU内の複数のコアにより実行することが可能である。
 サポート装置500の記憶媒体501,PLC100のメモリカード116およびフィールド装置90のメモリカード96は、コンピュータその他装置、機械等が記録されたプログラム等の情報を読み取り可能なように、当該プログラム等の情報を、電気的、磁気的、光学的、機械的または化学的作用によって蓄積する媒体である。サポート装置500のCPU502、PLC100のプロセッサ112およびフィールド装置90のプロセッサ91は、これら記憶媒体から、上記に述べたプログラムを取得してもよい。
 <N.付記>
 上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
 ネットワーク(11)接続される複数の制御装置(100)を備える制御システムであって、
 制御対象(90,90A,90B)の制御に関する値である制御指令を算出し更新する命令を有する制御プログラム(69)を記憶するための各制御装置に備えられるプログラム記憶手段(119)と、
 各制御装置に備えられて、当該制御装置の前記プログラム記憶手段の制御プログラムを動作させる動作手段(112、110)と、
 同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、前記複数の制御装置のうちの1つ以上に配置するとともに、当該複数の制御プログラム間で同一の制御指令の更新が互いに競合しないように前記複数の制御プログラムの間で動作時間を調停する調停手段(64、66)と、を備える、制御システム。
[構成2]
 前記調停手段は、
 前記複数の制御プログラム間で前記同一の制御指令の更新が互いに競合干渉しないように前記複数の制御プログラムの動作時間を静的に決定する、構成1に記載に制御システム。
[構成3]
 前記調停手段は、
 前記複数の制御プログラムを前記複数の制御装置に分散して配置するとともに、工程の進行に応じて、前記複数の制御プログラムそれぞれが順番に動作されるように、前記動作時間を調停する、構成1または2に記載の制御システム。
[構成4]
 前記制御指令は、前記制御対象に与えられる前記制御指令を含み、前記調停手段は、さらに、
 前記制御対象が自己宛の前記制御指令を識別するための識別情報(87)を生成する、構成1から3のいずれか1に記載の制御システム。
[構成5]
 前記制御対象が自己宛の前記制御指令を識別するための識別情報は、当該制御対象に対する制御指令を更新した制御プログラムの識別子(872)を含む、構成4に記載の制御システム。
[構成6]
 前記制御対象が自己宛の前記制御指令を識別するための識別情報は、当該制御対象に対して複数の制御指令が与えられる場合に、当該複数の制御指令が当該制御対象に与えられる順序(871)を含む、構成5に記載の制御システム。
[構成7]
 前記複数の制御指令が当該制御対象に与えられる順序は、当該複数の制御指令を更新する前記複数の制御プログラムの間で調停された動作時間(651)に基づく、構成6に記載の制御システム。
[構成8]
 前記制御装置は、
 前記動作手段によって、前記複数の制御プログラムを、調停された前記動作時間に従い切替えながら動作させるとき、1の制御プログラムへの切替えを前記制御対象に通知し、
 前記通知(31)は、切替後に前記1の制御プログラムが更新する前記制御指令を識別するための識別情報(292)を含む、構成3に記載の制御システム。
[構成9]
 前記識別情報は、制御指令の種類を含む、構成4から8のいずれか1に記載の制御システム。
[構成10]
 前記制御に関する値は、動作時に前記制御プログラムが更新する変数の値を含む、構成1から9のいずれか1に記載の制御システム。
[構成11]
 ネットワーク(11)接続される複数の制御装置(100)を備える制御システムに接続可能なサポート装置(500)であって、
 各前記制御装置は、
 制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラム(69)を記憶するためのプログラム記憶手段(119)と、
 当該制御装置の前記プログラム記憶手段の制御プログラムを動作させる動作手段(110、112)と、を備え、
 前記サポート装置は、
 同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、前記複数の制御装置のうちの1つ以上に配置する配置手段(63)と、
 前記複数の制御プログラム間で前記同一の制御指令の更新が互いに競合しないように前記複数の制御プログラムの間で動作時間を調停する調停手段(64)と、を備える、サポート装置。
[構成12]
 ネットワーク(11)接続される複数の制御装置(100)を備える制御システムの挙動を設定するための設定プログラム(600)であって、
 各前記制御装置は、
 制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラム(69)を記憶するためのプログラム記憶手段(119)と、
 当該制御装置の前記プログラム記憶手段の制御プログラムを動作させる動作手段(110、112)と、を備え、
 前記設定プログラムは、コンピュータ(502)に、
 同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、前記複数の制御装置のうちの1つ以上に配置するステップ(S1、S3、S5)と、
 前記複数の制御プログラム間で前記同一の制御指令の更新が互いに競合しないように前記複数の制御プログラムの間で動作時間を調停するステップ(S7)と、を実行させる、設定プログラム。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 1 システム、3A,3B,3C 機器群、11 ネットワーク、20 通信フレーム、26 ペイロード、30 マルチキャストアドレス、31 通知、62 配置プログラム、63 配置ツール、64 スケジュール生成ツール、65,65A UPGスケジュール、66 スケジュール生成プログラム、67 ストリーム情報生成プログラム、68 UPG生成プログラム、69 UPGプログラム、87 ストリーム情報、90 フィールド装置、90A,90B ロボットコントローラ、91,112 プロセッサ、92 メモリ、110 演算処理部、114 記憶部、119 ストレージ、120 周辺処理プログラム、121,831 時刻同期プログラム、125 リフレッシュプログラム、126 コンフィギュレーション、128 管理者切替プログラム、170 UPGライブラリ、171,172,902 スケジューリング処理部、173,903 変数管理処理部、174,904 ストリーム確認処理部、175,905 ストリーム生成処理部、176,906 通信基本処理部、179,909 時刻同期処理部、180 管理者切替部、211 実行指示、220 完了通知、221,291 実行開始時間、500 サポート装置、870 動的ストリーム情報、873 順番、900A,900B ロボット、901 アプリ処理部、910 ストリーム情報登録部、611 競合検出プログラム。

Claims (12)

  1.  ネットワーク接続される複数の制御装置を備える制御システムであって、
     制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラムを記憶するための各制御装置に備えられるプログラム記憶手段と、
     各制御装置に備えられて、当該制御装置の前記プログラム記憶手段の制御プログラムを動作させる動作手段と、
     同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、前記複数の制御装置のうちの1つ以上に配置するとともに、当該複数の制御プログラム間で前記同一の制御指令の更新が互いに競合しないように前記複数の制御プログラムの間で動作時間を調停する調停手段と、を備える、制御システム。
  2.  前記調停手段は、
     前記複数の制御プログラム間で前記同一の制御指令の更新が互いに競合しないように前記複数の制御プログラムの動作時間を静的に決定する、請求項1に記載の制御システム。
  3.  前記調停手段は、
     前記複数の制御プログラムを前記複数の制御装置に分散して配置するとともに、工程の進行に応じて、前記複数の制御プログラムそれぞれが順番に動作されるように、前記動作時間を調停する、請求項1または2に記載の制御システム。
  4.  前記制御指令は、前記制御対象に与えられる前記制御指令を含み、
     前記調停手段は、さらに、
     前記制御対象が自己宛の前記制御指令を識別するための識別情報を生成する、請求項1から3のいずれか1項に記載の制御システム。
  5.  前記制御対象が自己宛の前記制御指令を識別するための識別情報は、当該制御対象に対する制御指令を更新した制御プログラムの識別子を含む、請求項4に記載の制御システム。
  6.  前記制御対象が自己宛の前記制御指令を識別するための識別情報は、当該制御対象に対して複数の制御指令が与えられる場合に、当該複数の制御指令が当該制御対象に与えられる順序を含む、請求項5に記載の制御システム。
  7.  前記複数の制御指令が当該制御対象に与えられる順序は、当該複数の制御指令を更新する前記複数の制御プログラムの間で調停された動作時間に基づく、請求項6に記載の制御システム。
  8.  前記制御装置は、
     前記動作手段によって、前記複数の制御プログラムを、調停された前記動作時間に従い切替えながら動作させるとき、1の制御プログラムへの切替えを前記制御対象に通知し、
     前記通知は、切替後に前記1の制御プログラムが更新する前記制御指令を識別するための識別情報を含む、請求項3に記載の制御システム。
  9.  前記識別情報は、制御指令の種類を含む、請求項4から8のいずれか1項に記載の制御システム。
  10.  前記制御に関する値は、動作時に前記制御プログラムが更新する変数の値を含む、請求項1から9のいずれか1項に記載の制御システム。
  11.  ネットワーク接続される複数の制御装置を備える制御システムに接続可能なサポート装置であって、
     各前記制御装置は、
     制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラムを記憶するためのプログラム記憶手段と、
     当該制御装置の前記プログラム記憶手段の制御プログラムを動作させる動作手段と、を備え、
     前記サポート装置は、
     同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、前記複数の制御装置のうちの1つ以上に配置する配置手段と、
     前記複数の制御プログラム間で前記同一の制御指令の更新が互いに競合しないように前記複数の制御プログラムの間で動作時間を調停する調停手段と、を備える、サポート装置。
  12.  ネットワーク接続される複数の制御装置を備える制御システムの挙動を設定するための設定プログラムであって、
     各前記制御装置は、
     制御対象の制御に関する値である制御指令を算出し更新する命令を有する制御プログラムを記憶するためのプログラム記憶手段と、
     当該制御装置の前記プログラム記憶手段の制御プログラムを動作させる動作手段と、を備え、
     前記設定プログラムは、コンピュータに、
     同一の制御指令を算出し更新する命令を有している複数の制御プログラムを、前記複数の制御装置のうちの1つ以上に配置するステップと、
     前記複数の制御プログラム間で前記同一の制御指令の更新が互いに競合しないように前記複数の制御プログラムの間で動作時間を調停するステップと、を実行させる、設定プログラム。
PCT/JP2020/010349 2019-07-03 2020-03-10 制御システム、サポート装置および設定プログラム WO2021002060A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/622,616 US20220357715A1 (en) 2019-07-03 2020-03-10 Control System, Support Device, and Computer-Readable Storage Medium
EP20834364.0A EP3995911A4 (en) 2019-07-03 2020-03-10 CONTROL SYSTEM, SUPPORT DEVICE AND ADJUSTMENT PROGRAM
CN202080046811.9A CN114072739A (zh) 2019-07-03 2020-03-10 控制***、支持装置以及设定程序

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019-124436 2019-07-03
JP2019124436A JP7415345B2 (ja) 2019-07-03 2019-07-03 制御システム、サポート装置および設定プログラム

Publications (1)

Publication Number Publication Date
WO2021002060A1 true WO2021002060A1 (ja) 2021-01-07

Family

ID=74101268

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/010349 WO2021002060A1 (ja) 2019-07-03 2020-03-10 制御システム、サポート装置および設定プログラム

Country Status (5)

Country Link
US (1) US20220357715A1 (ja)
EP (1) EP3995911A4 (ja)
JP (1) JP7415345B2 (ja)
CN (1) CN114072739A (ja)
WO (1) WO2021002060A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10164167A (ja) 1996-11-29 1998-06-19 Omron Corp プログラマブルコントローラ
JP2004178578A (ja) * 2002-11-15 2004-06-24 Matsushita Electric Ind Co Ltd 競合調停装置、競合調停方法および競合調停プログラム
JP2018180706A (ja) * 2017-04-06 2018-11-15 富士電機株式会社 支援装置、プログラム
JP6481248B1 (ja) * 2018-06-22 2019-03-13 ソフトサーボシステムズ株式会社 モーション制御プログラム、モーション制御方法及びモーション制御装置
JP2019067046A (ja) * 2017-09-29 2019-04-25 オムロン株式会社 制御システムおよび制御装置
JP2019106225A (ja) * 2019-04-08 2019-06-27 オムロン株式会社 制御装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4858101A (en) * 1987-08-26 1989-08-15 Allen-Bradley Company, Inc. Programmable controller with parallel processors
US5546543A (en) * 1993-03-26 1996-08-13 Digital Equipment Corporation Method for assigning priority to receive and transmit requests in response to occupancy of receive and transmit buffers when transmission and reception are in progress
JP2009017269A (ja) * 2007-07-05 2009-01-22 Hitachi Ltd ネットワーク制御装置、ネットワーク制御方法、およびプログラム
DE102008018962B4 (de) * 2008-04-16 2015-08-20 Kuka Roboter Gmbh Verfahren zur Steuerung eines Roboters
JP4840455B2 (ja) * 2009-02-05 2011-12-21 横河電機株式会社 フィールド制御システム
JP4876138B2 (ja) * 2009-03-24 2012-02-15 株式会社日立産機システム 制御用計算機および制御システム
EP2806520A1 (en) * 2013-05-22 2014-11-26 Vito NV Power supply network control system and method
JP6540166B2 (ja) * 2015-03-31 2019-07-10 オムロン株式会社 制御装置
WO2018142750A1 (ja) * 2017-02-01 2018-08-09 住友電気工業株式会社 制御装置、プログラム更新方法、およびコンピュータプログラム
JP6926539B2 (ja) * 2017-03-10 2021-08-25 オムロン株式会社 制御装置およびプログラム
CN108401168B (zh) * 2018-03-02 2021-04-06 深圳创维数字技术有限公司 一种冲突解决方法、装置、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10164167A (ja) 1996-11-29 1998-06-19 Omron Corp プログラマブルコントローラ
JP2004178578A (ja) * 2002-11-15 2004-06-24 Matsushita Electric Ind Co Ltd 競合調停装置、競合調停方法および競合調停プログラム
JP2018180706A (ja) * 2017-04-06 2018-11-15 富士電機株式会社 支援装置、プログラム
JP2019067046A (ja) * 2017-09-29 2019-04-25 オムロン株式会社 制御システムおよび制御装置
JP6481248B1 (ja) * 2018-06-22 2019-03-13 ソフトサーボシステムズ株式会社 モーション制御プログラム、モーション制御方法及びモーション制御装置
JP2019106225A (ja) * 2019-04-08 2019-06-27 オムロン株式会社 制御装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3995911A4

Also Published As

Publication number Publication date
US20220357715A1 (en) 2022-11-10
EP3995911A4 (en) 2023-03-22
EP3995911A1 (en) 2022-05-11
CN114072739A (zh) 2022-02-18
JP7415345B2 (ja) 2024-01-17
JP2021012404A (ja) 2021-02-04

Similar Documents

Publication Publication Date Title
JP6962099B2 (ja) 制御システムおよび制御装置
WO2021002059A1 (ja) 制御システム、設定装置およびコンピュータプログラム
US9618924B2 (en) CPU of PLC, system program for PLC, and recording medium storing system program for PLC
JPWO2019049195A1 (ja) シミュレーション装置およびシミュレーション方法
WO2021059561A1 (ja) 制御システム、情報処理装置およびプログラム
CN113508560B (zh) 控制***、装置以及控制方法
WO2012132692A1 (ja) 並列処理システム及び並列処理システムの動作方法
JP5611158B2 (ja) データ中継制御装置、リンク間転送設定支援装置およびリンク間転送設定方法
WO2021002060A1 (ja) 制御システム、サポート装置および設定プログラム
EP3764175B1 (en) Control device and control system
CN116171411A (zh) 控制装置及程序
JP6924898B2 (ja) トランザクション処理方法、装置及びデバイス
JP7231073B2 (ja) 制御装置および制御システム
CN111830895B (zh) 基于plc阵列的数据调度方法、介质、plc设备及调度***
US20230273598A1 (en) Sharing world model objects between multiple autonomous systems
JP2018129614A (ja) 制御装置および通信装置
Chen et al. Enabling Hardware-Based Technologies for Real-Time Simulation and Control of Flexible Manufacturing Systems

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020834364

Country of ref document: EP

Effective date: 20220203