WO2022050090A1 - コントロールシステム - Google Patents

コントロールシステム Download PDF

Info

Publication number
WO2022050090A1
WO2022050090A1 PCT/JP2021/030634 JP2021030634W WO2022050090A1 WO 2022050090 A1 WO2022050090 A1 WO 2022050090A1 JP 2021030634 W JP2021030634 W JP 2021030634W WO 2022050090 A1 WO2022050090 A1 WO 2022050090A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
control
program
application
arithmetic unit
Prior art date
Application number
PCT/JP2021/030634
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 JP2022546232A priority Critical patent/JP7465984B2/ja
Publication of WO2022050090A1 publication Critical patent/WO2022050090A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention generally relates to a control system.
  • Patent Document 1 discloses a program management method for a distributed system.
  • Patent Document 1 describes a group of controllers in which a common module is mounted in a distributed system in which a controller is provided with a module execution mechanism for executing a control program in units of modules (or subroutines) and a plurality of controllers are connected by a network.
  • a program management method for a distributed system with a program management device that collectively changes modules by downloading modified modules via the network.
  • the control system includes at least one control device.
  • the control device is an arithmetic unit in which at least one control program is arranged.
  • the role of the control device is to control the controlled device (for example, industrial equipment) without delay by executing the control program periodically.
  • Arithmetic logic units have hardware resources such as processors and memory, but the hardware resources required to play a role are usually less than the hardware resources of general computers, so they are usually components of control systems.
  • the amount of hardware resources of the arithmetic unit, which is said to be, is smaller than that of a general computer.
  • the controlled device is typically an industrial device, and since the industrial device is expected to operate for a long period of time in a production line such as a factory as compared with a general computer, a fan used for cooling a CPU or the like. This is because there are restrictions such as not being able to mount such equipment.
  • the communication for acquiring the information necessary for controlling the controlled device is a part of the control by the control program (that is, the communication is described in the control program).
  • the communication is described in the control program.
  • the controlled target device of the control device is generally an automatic machine or a production facility such as a machine tool, an automatic assembly device or an automatic transfer device, so that high stability, that is, real-time performance is achieved. This is because it is required.
  • the control program performs scan processing at each control cycle specified in advance.
  • the "scan process” is a process including reading information of a device connected to an I / O (Input / Output) port, calculating the read information, and writing the calculated information.
  • the time composed of the scan time, which is the time required for the scan process, and the standby time, which is the time other than the scan time, is referred to as a "control cycle” (or “control program processing cycle”).
  • the information program can operate in a processing cycle different from the processing cycle of the control program, and does not necessarily have to operate periodically. Further, the information program can also execute the processing of the information program during the waiting time (for example, the time when the control program is not using the hardware resource) in the processing cycle of the control program.
  • a control system that controls one or a plurality of controlled devices includes a plurality of arithmetic units, each of which has an interface device, a storage device, and a processor connected to them, and an arrangement control unit that controls the arrangement of programs.
  • the interface device of the arithmetic unit is one or more interface devices included in the arithmetic unit.
  • the plurality of arithmetic units have one or a plurality of control programs and one or a plurality of information programs.
  • the control program performs a scan process, which is a process of controlling the controlled target device and has real-time performance, at each control cycle defined for the control program. It is a program to be done within.
  • the information program is a program that performs information processing defined for the information program.
  • the placement control unit determines whether or not the control program needs to be rearranged. If the result of the determination is true, the arrangement control unit determines the control program to be rearranged from one or more control programs, and the overall configuration information (the arithmetic unit performs real-time performance for each of the plurality of arithmetic units). Based on information including information indicating whether or not it has and one or more interface devices possessed by the arithmetic unit, the real-time property and the control program to be relocated use the placement destination of the control program to be relocated. It is determined to be an arithmetic unit having an interface device to be relocated, and the control program to be relocated is arranged in the determined arithmetic unit in place of the arithmetic unit in which the control program is arranged.
  • An example of the physical configuration of the system including the control system according to the first embodiment is shown.
  • An example of the logical configuration of the control system is shown.
  • the configuration of PIO bus control is shown.
  • the configuration of network control is shown.
  • An example of the setting information of the control application is shown.
  • An example of the setting information of the information application is shown.
  • the configuration of the control sharing I / F is shown.
  • the configuration of the information sharing I / F is shown. Shows the structure of the app table.
  • the configuration of the network mapping table is shown.
  • the configuration of the bus mapping table is shown.
  • the configuration of the memory mapping table is shown.
  • the configuration of the data mapping table is shown.
  • An example of the process related to the setting of the setting information of the control application is shown.
  • An example of the process of generating or updating the network mapping table is shown.
  • An example of the process of generating or updating the bus mapping table is shown.
  • An example of the process of generating or updating the memory mapping table is shown.
  • An example of the flow of data sharing between applications is shown.
  • An example of the control system according to the second embodiment before the system configuration change is shown.
  • An example of the control system according to the second embodiment after the system configuration change is shown.
  • An example of the configuration management GUI before the system configuration change is shown.
  • An example of the configuration management GUI after the system configuration change is shown.
  • the configuration of the overall configuration table is shown.
  • the configuration of the application table according to the second embodiment is shown.
  • An example of the process of updating the entire configuration table is shown.
  • An example of application placement control processing is shown.
  • the industrial control system includes one or more industrial control devices.
  • the control system can typically further include an expansion device that shares hardware resources (eg, the I / O port of the control device) with the control device and deploys a control program or information program.
  • the control device may acquire information on an expansion device that can share hardware resources, and may arrange a control program or an information program in the control device and the shared expansion device.
  • the expansion device does not necessarily have to be able to share the hardware resources of the control device.
  • an expansion device connected to a bus to which a control device is connected may be able to share the hardware resources of the control device
  • an expansion device connected to a communication network to which the control device is connected may be a control device.
  • Hardware resources do not have to be shareable.
  • Both the control device and the expansion device are examples of arithmetic units.
  • the "interface device” may be one or more interface devices.
  • the one or more interface devices may be one or more similar communication interface devices or two or more different types of communication interface devices.
  • the "memory” is one or more memory devices, and may be typically a main storage device. At least one memory device in the memory may be a volatile memory device or a non-volatile memory device.
  • the "permanent storage device” is one or more permanent storage devices.
  • the permanent storage device is typically a non-volatile storage device (for example, an auxiliary storage device), and specifically, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive).
  • the “storage device” may be a memory and at least a memory of a permanent storage device.
  • the processor may be one or more processor devices.
  • the at least one processor device is typically a microprocessor device such as a CPU (Central Processing Unit), but may be another type of processor device such as a GPU (Graphics Processing Unit).
  • At least one processor device may be single-core or multi-core.
  • At least one processor device may be a processor core.
  • At least one processor device is a processor in a broad sense such as a hardware circuit (for example, FPGA (Field-Programmable Gate Array), CPLD (Complex Programmable Logic Device) or ASIC (Application Specific Integrated Circuit)) that performs a part or all of processing. It may be a device.
  • FPGA Field-Programmable Gate Array
  • CPLD Complex Programmable Logic Device
  • ASIC Application Specific Integrated Circuit
  • the process may be described with "program” as the subject, but the program is executed by the processor to appropriately perform the specified process in the storage device and / or the interface device and the like.
  • the subject of the process may be a processor (or a device such as a controller having the processor) because it is performed while using it.
  • the program may be installed from a program source into a device such as a calculator.
  • the program source may be, for example, a program distribution server or a computer-readable (eg, non-temporary) recording medium.
  • two or more programs may be realized as one program, or one program may be realized as two or more programs.
  • the function may be described by the expression of "yy part", but the function may be realized by executing one or more computer programs by the processor.
  • the function When the function is realized by executing the program by the processor, the specified processing is appropriately performed by using the storage device and / or the interface device, so that the function may be at least a part of the processor. good.
  • the process described with the function as the subject may be a process performed by a processor or a device having the processor.
  • the description of each function is an example, and a plurality of functions may be combined into one function, or one function may be divided into a plurality of functions.
  • information for which an output can be obtained for an input may be described by an expression such as "xxx table”, but the information may be data having any structure (for example, a structure). It may be structured data or unstructured data), a neural network that generates an output for an input, a genetic algorithm, or a learning model represented by a random forest. Therefore, the "xxx table” can be referred to as "xxx information”. Further, in the following description, the configuration of each table is an example, and one table may be divided into two or more tables, or all or a part of two or more tables may be one table. You may.
  • any one of ID, name and number is adopted as an example of the identification information, but the identification information is used in place of or in addition to at least one of the ID, name and number. It may contain seed elements.
  • the common part of the reference codes may be used when the same type of elements are not distinguished, and the reference code may be used when the same type of elements are described separately. be.
  • control program is a control application
  • information program is an information application.
  • App is an abbreviation for application program.
  • FIG. 1 shows an example of a physical configuration of a system including a control system according to the first embodiment.
  • the control system 109 is installed in the factory 10 where the controlled device 12 is located.
  • the controlled object device 12 is, for example, an industrial device such as an industrial motor or a compressor.
  • the factory 10 is an example of a site where the controlled device 12 is located.
  • the management system 101 and the control system 109 are connected to a communication network 108 (for example, the Internet or a WAN (Wide Area Network)).
  • the control system 109 is connected to, for example, a communication network 19 (for example, a LAN (Local Area Network)) in the factory 10.
  • the control system 109 can communicate with the management system 101 via the communication networks 19 and 108.
  • the communication networks 108 and 19 are communication networks used for information communication processing performed by the information application (communication processing different from the processing in which the control application transmits control data to the controlled device 12 in the scanning process).
  • a control system 109 and one or more I / O modules 119 are connected to a communication network 118 (eg, Ethernet®).
  • the communication network 118 is a communication network used for transmitting control data to the control target device 12 in the control process performed by the control application.
  • the communication networks 19, 108 and 118 may be different networks, or two or more of the communication networks 19, 108 and 118 may be the same network.
  • the peripheral device 120 may be a device such as a sensor or a media drive (for example, HDD or SSD).
  • the I / O module 119 functions as a bus slot in which the peripheral device 120 is detachably mounted as needed.
  • the controlled device 12 is connected to the I / O module 119 via or not via the peripheral device 120.
  • the controlled device 12 and the I / O module 119 may be any of 1: 1, 1: many, many: 1 and many: many.
  • some I / O modules 119 may be connected to the communication network 108 in addition to the communication network 118, that is, the part of the I / O modules 119 is a device shared by the control application and the information application. It may be.
  • the at least one I / O module 119 may be at least a part of the network I / F device and the I / O control device of the at least one arithmetic unit 40.
  • the management system 101 is an example of a higher-level system of the control system 109.
  • the management system 101 includes an EPROM 201, a CPU 202, a main memory 203, a peripheral control device 205, a non-volatile storage device 206, and a network I / F device 207.
  • the management system 101 is connected to the communication network 108 via the network I / F device 207.
  • the control system 109 includes one or more arithmetic units 40.
  • Each arithmetic unit 40 includes an interface device, a storage device, and a processor connected to them. All arithmetic units 40 may have the same or different hardware configurations. Any arithmetic unit 40 may be the placement destination of the control application or the placement destination of the information application.
  • the arithmetic unit 40M is the main arithmetic unit, the arithmetic unit where the control application is arranged, and which can be the arrangement destination of the information application.
  • Each of the arithmetic units 40E1 and 40E2 is an additional arithmetic unit, which cannot be the placement destination of the control application and can be the placement destination of the information application.
  • the arithmetic unit 40E may be reduced. In other words, the arithmetic unit 40M alone may become the control system 109.
  • the arithmetic unit 40M may be referred to as a "control device 40M”
  • the arithmetic unit 40E may be referred to as an "expansion device 40E".
  • the control system 109 depends on whether or not the expansion device 40E is present, which type of communication medium the expansion device 40E is connected to, and which arithmetic unit 40 the information application that communicates with the control application is arranged in.
  • System configuration is different. That is, the system configuration depends on the presence / absence of the expansion device 40E, the type of communication medium to which each of the control device 40M and the expansion device 40E is connected, and the arithmetic unit 40 to which each application is arranged.
  • the expansion device 40E1 is connected to the communication network 118.
  • the expansion device 40E2 is connected to a PIO bus 28 (an example of a bus) (“PIO” is an abbreviation for Programmed I / O).
  • the PIO bus 28 may be a bus printed on the base board, and by connecting the control device 40M and the expansion device 40E2 to the base board, the control application executed by the control device 40M and the expansion device 40E2 are executed.
  • the information application may communicate (share) data via the PIO bus 28.
  • control application can be arranged in the expansion device 40E, or in the embodiment in which any arithmetic unit 40 can be expanded or reduced and any arithmetic unit 40 can be an arrangement destination of the control application, the system.
  • the configuration also depends on the control app.
  • control device 40M is connected to a memory 169 (for example, EPROM 208 and main memory 210), a peripheral control device 212, an I / O control device 214, a non-volatile storage device 215, a network I / F device 213, and the like. It is equipped with a CPU 209.
  • the I / O control device 214 and the network I / F device 213 are examples of the interface device.
  • the memory 169 and the non-volatile storage device 215 are examples of the storage device.
  • CPU 209 is an example of a processor.
  • the peripheral control device 212 is connected to the network I / F device 213, the I / O control device 214, the non-volatile storage device 215, and the bus 211.
  • a memory 169 and a CPU 209 are also connected to the bus 211.
  • At least one of the control application and the information application may be stored in the EPROM 208 in advance, or a program downloaded from a program source such as a program distribution server (not shown) may be stored. Not only one control application and one information application installed in the control system 109, but also a plurality of control applications and / or a plurality of information applications can be installed by setting resources that can be used by the control system 109 for each program. be able to.
  • the CPU 209 reads the control application (and information application) stored in the EPROM 208 into the main memory 210 and executes it to control the operation of the control application (and information application). For example, the CPU 209 controls a plurality of peripheral devices 120 via the peripheral control device 212, the I / O control device 214, and the plurality of I / O modules 119 by executing the control application.
  • the peripheral device 120 may be associated with the I / O module 119 in a ratio of 1: 1.
  • the CPU 209 may be either a single core or a multi-core.
  • One core may run at least one of one or more control apps and one or more information apps. Typically, one core may run one control app, one control app and one or more information apps, or one or more information apps.
  • the setting terminal 29 is connected to the control system 109 (for example, the control device 40M) via the communication network 19 (or not via the communication network 19).
  • the setting terminal 29 is, for example, a computer having an input device, a display device, an interface device, a storage device, and a processor connected to them (for example, a desktop type, laptop type or tablet type personal computer, or a smartphone). ..
  • the setting terminal 29 may give instructions and settings to the control system 109.
  • the setting terminal 29 may be a part of the management system 101.
  • FIG. 2 shows an example of the logical configuration of the control system 109.
  • the control system 109 illustrated in FIG. 2 has a control device 40M and expansion devices 40E1 and 40E2 as an example of a plurality of arithmetic units 40.
  • the control device 40M has a shared memory 56.
  • the shared memory 56 is at least a part of the storage area of the memory 169. Although not shown, the shared memory may also be present in at least one of the expansion devices 40E1 and 40E2.
  • the expansion device 40E1 is an arithmetic unit connected to the backboard 17 to which the control device 40M is connected.
  • the communication medium between the control device 40M and the expansion device 40E1 is the PIO bus 28 provided on the backboard 17.
  • the expansion device 40E2 is an arithmetic unit connected to the communication network 118 to which the control device 40M is connected.
  • the communication medium between the control device 40M and the expansion device 40E2 is the communication network 118.
  • control system 109 can use a plurality of types of communication media such as the shared memory 56, the PIO bus 28, and the communication network 118 for data sharing between applications.
  • the arithmetic unit 40 that communicates via the PIO bus 28 has an I / F for the PIO bus 28 called the PIO bus control 61.
  • the PIO bus control 61 includes a bus I / F 301, a bus driver 302, and a bus HW 303, as illustrated in FIG.
  • Bus I / F 301 is software I / F for PIO bus 28.
  • the bus driver 302 is software that controls data sharing (communication) via the PIO bus 28.
  • the bus HW 303 is hardware (for example, FPGA (Field-Programmable Gate Array) or ASIC (Application Specific Integrated Circuit)) that controls data sharing (communication) via the PIO bus 28.
  • the bus HW 303 may be, for example, at least a part of the I / O controller 214 (see FIG. 1).
  • the arithmetic unit 40 that performs communication via a communication network has an I / F for a communication network called a network control 62.
  • the network control 62 includes a network I / F 401, a network driver 402, and a network HW 403, as illustrated in FIG.
  • the network I / F 401 is software I / F for a communication network.
  • the network driver 402 is software that controls data sharing (communication) via the target network.
  • the network HW403 is hardware that controls data sharing (communication) via the target network.
  • the network HW403 may be, for example, at least a part of the network I / F device 213 (see FIG. 1).
  • the control device 40M executes the WEB server 69.
  • the WEB server 69 is a program for functioning as a WEB server.
  • the WEB server 69 communicates with at least one of the management system 101 and the setting terminal 29.
  • the WEB server 69 is an example of a user interface program that receives various instructions and settings from the setting terminal 29.
  • the WEB server 69 may be executed by at least one expansion device 40E in place of or in addition to the control device 40M.
  • the non-volatile storage device 206 (an example of the storage device) of the management system 101 stores the VCPU management information 73.
  • the VCPU management information 73 includes, for example, a VCPU image and a VCPU ID for each VCPU.
  • "VCPU" means a virtual CPU and is an example of an application execution environment.
  • the VCPU may be, for example, a VM (virtual machine) or a container.
  • the management system 101 has a distribution unit 72.
  • the distribution unit 72 distributes the VCPU image to the arithmetic unit 40 via the communication network 108.
  • the VCPU 37 is generated based on the VCPU image.
  • the VCPU 37 executes one or more applications (in this embodiment, either the control application 41 or the information application 42). After the VCPU 37 is realized, the application may be distributed to the VCPU 37 by the distribution unit 72, or the VCPU image includes the image of the application, and the VCPU including the application is realized based on the VCPU image. May be good. In the example shown in FIG.
  • VCPU37A and 37B are distributed to the control device 40M
  • VCPU37C is distributed to the expansion device 40E1
  • VCPU37D is distributed to the expansion device 40E2.
  • the VCPU 37A executes the control application 41.
  • the VCPU 37B executes the information application 42A.
  • the VCPU 37C executes the information application 42B.
  • the VCPU 37D executes the information application 42C.
  • the information application 42 is an application that performs information processing specified in the information application 42.
  • the control application 41 is a process for controlling the controlled target device 12 and a process having real-time performance (information on the device connected to the I / O port), which is a process for controlling the controlled device 12 at each control cycle defined for the control application 41. Processing including reading, calculating the read information, and writing the calculated information) is performed.
  • the time required for the scan process is called "scan time”.
  • the control cycle is composed of a scan time and a waiting time which is a time other than the scan time. For example, when the control system 109 is a single control device 40M, the control device 40M has a control application 41 and one or more information applications 42, and the CPU 209 has a single core, the standby time during the control cycle is set.
  • At least one of one or more information apps 42 is executed. On the other hand, for example, in any of the following cases, at least one information application 42 may be executed during the scan time (in other words, even if it is not the waiting time).
  • the CPU 209 has a multi-core and the CPU 209 has a CPU core that the control application 41 does not occupy.
  • the control device 40M has a plurality of CPU 209s, and the plurality of CPU 209s include a CPU 209 which is not exclusively used by the control application 41.
  • there is an expansion device 40E and the information application 42 is arranged in the expansion device 40E.
  • both the control application 41 and the information application 42 are executed by one arithmetic unit 40 (control device 40M in the example shown in FIG. 2) without degrading the reliability of control. Can be executed.
  • the app developer in order to realize data sharing between apps on different VCPUs, the app developer can use any type of communication medium for both the control app and the information app. It is necessary to decide in advance whether to share data, and set the information required for data sharing, which is information according to the type of the communication medium, in the application.
  • the information set in the application is called "setting information" for convenience.
  • specific examples of setting information are as follows. That is, when the type of the communication medium is shared memory, the setting information includes information representing the name of the shared memory and information representing the name of the data item of the shared data (data to be shared).
  • the setting information includes information representing a bus number (for example, a register address) and information representing the name of a data item of shared data.
  • the setting information includes information indicating a destination (for example, IP address and port number), information indicating a protocol type (for example, HTTP, Modbus / TCP), and data items of shared data. Contains information that represents the name of.
  • the setting information of the application depends on which type of communication medium the application shares data with, so that the application development is complicated.
  • the placement destination of the application must be an arithmetic unit capable of communicating via a communication medium of the type corresponding to the setting information. That is, since the placement destination of the application depends on the setting information of the application, the degree of freedom of the placement destination of the application is low.
  • a shared I / F (shared interface) that realizes data sharing is provided regardless of whether the communication medium is the shared memory 56, the PIO bus 28, or the communication network 118.
  • the shared I / F is a layer I / F higher than the I / F for shared memory generally provided by the OS.
  • the shared I / F accepts I / O specifications (for example, function call) from the application, but if the name of the destination application and the name of the data item of the shared data are used as arguments in the I / O specification.
  • I / O specifications for example, function call
  • each arithmetic unit 40 has a shared I / F.
  • the existence of the shared I / F enables data sharing without the need for the application to be aware of the type of communication medium. Therefore, the placement destination of the application does not depend on the setting information of the application. Therefore, there is a high degree of freedom in where to place the application.
  • the system configuration change of the control system 109 capable of using at least one of the communication network 118 and the PIO bus 28 in addition to the shared memory 56 for data sharing between applications ( For example, at least one of changing the arithmetic unit 40 to which the application is placed and changing the type of the communication medium to which the arithmetic unit 40 is connected) with the addition or decrease of the arithmetic unit 40) is controlled. It can be done flexibly while maintaining the real-time property of.
  • Data sharing between the applications may be performed between the control applications 41 or between the information applications 42, but in the present embodiment, one control application 41 is associated with one or a plurality of information applications 42. Take the case of sharing data as an example.
  • the OS (Operating System) of the control device 40M is a real-time general-purpose OS (an OS having a real-time function capable of providing the required real-time performance although it is a system of general-purpose OS for information processing).
  • the execution timing of the control application 41 and the information application 42 may be controlled by the real-time general-purpose OS.
  • the execution timing of the control application 41 or the information application 42 may be controlled by the runtime software.
  • the shared I / F may be common to the control application 41 and the information application 42, but in the present embodiment, the control shared I / F 36 which is the shared I / F for the control application 41 and the shared I / F for the information application 42 There is an information sharing I / F37 which is F. That is, the shared I / F used by the control application 41 and the information application 42 is different. As a result, the configuration of the shared I / F 36 used in the control application 41 can be configured in consideration of the real-time property of the control, and thus can contribute to the maintenance of the real-time property of the control.
  • control sharing I / F 36 may be common to the plurality of control applications 41, but the control application I / F 36 exists for each control application 41. It's okay.
  • information sharing I / F 37 may be common to the plurality of information applications 42, but the information sharing I / F 37 may be common to each information application 42. / F37 may be present. According to the example shown in FIG.
  • the control sharing I / F36 used by the control application 41 and the information sharing I / F37A used by the information application 42A Is present in the control device 40M. Since the information application 42B exists in the expansion device 40E1, the information sharing I / F37B used for the information application 42B exists in the expansion device 40E1. Since the information application 42C exists in the expansion device 40E2, the information sharing I / F37C used for the information application 42C exists in the expansion device 40E2.
  • the mapping table group 80 exists in the control device 40M and each expansion device 40E.
  • the mapping table group 80 is a table group referred to by the shared I / F for data sharing (“table group” is one or more tables).
  • the mapping table group 80 includes an application mapping table group 81 which is a mapping table group for an application and a data mapping table group 82 which is a mapping table group for data.
  • the mapping table group 80X includes the application mapping table group 81X and the data mapping table group 82X, and exists in the control device 40M.
  • the mapping table group 80Y includes the application mapping table group 81Y and the data mapping table group 82Y, and exists in the expansion device 40E1.
  • the mapping table group 80Z includes an application mapping table group 81Z and a data mapping table group 82Z, and exists in the expansion device 40E2.
  • the control application 41 specifies I / O for the control sharing I / F 36 based on the setting information of the control application 41.
  • the control sharing I / F 36 refers to the mapping table group 80X and performs one of the following. -In order to share variable value data with the information application 42A via the shared memory 56, I / O of the variable value is performed on the shared memory 56. -In order to share variable value data with the information application 42B via the PIO bus 28, I / O of the variable value is performed for the PIO bus control 61A. -In order to share variable value data with the information application 42C via the communication network 118, I / O of the variable value is performed for the network control 62A.
  • the information application 42A specifies I / O for the information sharing I / F37A based on the setting information of the information application 42A.
  • the information sharing I / F37A refers to the mapping table group 80X and shares the variable value data with the control application 41 via the shared memory 56. I / O of the variable value is performed on 56.
  • the information application 42B specifies I / O for the information sharing I / F37B based on the setting information of the information application 42B.
  • the information sharing I / F37B refers to the mapping table group 80Y and shares variable value data with the control application 41 via the PIO bus 28, so that the PIO bus can be used. I / O of the variable value is performed for the control 61B.
  • the information application 42C specifies I / O for the information sharing I / F37C based on the setting information of the information application 42C.
  • the information sharing I / F37C refers to the mapping table group 80Z and performs network control in order to share variable value data with the control application 41 via the communication network 118. I / O of the variable value is performed for 62B.
  • the setting information of the control application 41 is referred to as “first setting information”
  • the setting information of the information application 42 is referred to as “second setting information”.
  • the shared data is a variable value (variable value)
  • the name of the data item of the shared data is a variable name (variable name).
  • Both the first setting information and the second setting information are information that does not depend on the type of communication medium.
  • the first setting information 500 of the control application 41 includes information such as a variable name 501, a destination application name 502, and an access right 503 for each variable to be shared by the control application 41.
  • the variable name 501 is information representing the name of the target variable.
  • the destination application name 502 represents the name of the other application that shares the variable value of the target variable (“ALL” means all applications other than the control application 41 (all information applications 42 in this embodiment)).
  • the access right 503 represents the name of the application that writes the variable value of the target variable and the name of the application that reads the variable value of the target variable (“ALL” means all applications other than the control application 41. do).
  • the variable value of the variable 1 is shared with all the information applications 42, written by the control application 41, and read by all the information applications 42.
  • the second setting information 600 of the information application 42 includes information such as a variable name 601 and a destination application name 602 and an access right 603 for each variable to be shared by the information application 42.
  • the variable name 601 is information representing the name of the target variable.
  • the destination application name 602 represents the name of the other application that shares the variable value of the target variable.
  • the access right 603 represents the name of the application that writes the variable value of the target variable and the name of the application that reads the variable value of the target variable.
  • the variable value of the variable 1 is shared with the control application 41, written by the control application 41, and read by the information application 42.
  • FIG. 7 shows the configuration of the control sharing I / F36.
  • the control sharing I / F 36 has a control I / F unit 701 and a control sharing unit 702.
  • the control I / F unit 701 accepts an I / O designation from the control application 41.
  • the control sharing unit 702 refers to the mapping table group 80 and performs I / O (reading or writing) of the variable value.
  • the control sharing unit 702 has, for example, a library including a plurality of functions. Each function is a function for reading or writing.
  • FIG. 8 shows the configuration of the information sharing I / F37.
  • the information sharing I / F 37 has an information I / F unit 801 and an information sharing unit 802.
  • the information I / F unit 801 accepts the I / O designation from the information application 42.
  • the information sharing unit 802 refers to the mapping table group 80 in response to the I / O designation, and performs I / O of the variable value.
  • the information sharing unit 802 has, for example, a library including a plurality of functions. Each function is a function for reading or writing.
  • At least a part of at least one shared I / F may be included in at least one app.
  • at least a part of the control sharing I / F 36 may be included in the control application 41.
  • at least a part of the information sharing I / F 37 may be included in the information application 42.
  • the mapping table group 80 includes the application mapping table group 81 and the data mapping table group 82.
  • the app mapping table group 81 includes an app table 900 (see FIG. 9), a network mapping table 1000 (see FIG. 10), a bus mapping table 1100 (see FIG. 11), and a memory mapping table 1200 (see FIG. 12).
  • the data mapping table group 82 includes a data mapping table 1300 (see FIG. 13). At least a part of the mapping table group 80 may be included in the application. Hereinafter, each table will be described.
  • FIG. 9 shows the configuration of the application table 900.
  • the application table 900 holds information such as the application name 901 and the communication medium type 902 for each application existing in the control system 109. Take one app as an example (“target app” in the description of FIG. 9).
  • the application name 901 represents the name of the target application.
  • the communication medium type 902 represents the type of communication medium used by the target application for data sharing (“ALL” means that all types of communication media are used).
  • a system configuration change in which the type of communication medium between applications is changed (for example, changing the arithmetic unit 40 to which the application is placed due to the addition or decrease of the arithmetic unit 40, and communication of the connection destination of the arithmetic unit 40).
  • the application table 900 (correspondence between the application name 901 and the communication medium type 902) is updated.
  • the update of the application table 900 may be performed by, for example, the management system 101.
  • the value of the communication medium type 902 for at least one application may be a value representing a plurality of communication medium types. ..
  • FIG. 10 shows the configuration of the network mapping table 1000.
  • the network mapping table 1000 contains an application name 1001 and information necessary for data sharing via the communication network 118, for example, a protocol type 1002 and an IP address, for each application whose communication medium type 902 is "ALL" or "network". It holds information such as 1003, port number 1004, and data path 1005. Take one app as an example (“target app” in the description of FIG. 10).
  • the application name 1001 represents the name of the target application.
  • the protocol type 1002 represents a communication protocol type used for data sharing (communication) with the target application.
  • the IP address 1003 represents an IP address used for data sharing (communication) with the target application.
  • the port number 1004 represents the port number used for data sharing (communication) with the target application.
  • the data path 1005 represents a data path used for data sharing (communication) with the target application. In the I / O performed from the shared I / F to the network control 62 for data sharing with the target application, the information 1002 to 1005 corresponding to the target application is used.
  • FIG. 11 shows the configuration of the bus mapping table 1100.
  • the bus mapping table 1100 displays the application name 1101 and information necessary for data sharing via the PIO bus 28, for example, information such as the bus number 1102, for each application whose communication medium type 902 is "ALL" or "bus". Hold. Take one app as an example (“target app” in the description of FIG. 11).
  • the application name 1101 represents the name of the target application.
  • the bus number 1102 represents a bus number used for data sharing (communication) with the target application. In the I / O performed from the shared I / F to the PIO bus control 61 for data sharing with the target application, the bus number 1102 corresponding to the target application is used.
  • FIG. 12 shows the configuration of the memory mapping table 1200.
  • the memory mapping table 1200 includes an application name 1201 and information necessary for data sharing via the shared memory 56, for example, the shared memory name 1202, for each application whose communication medium type 902 is “ALL” or “shared memory”. Hold information. Take one app as an example (“target app” in the description of FIG. 12).
  • the application name 1201 represents the name of the target application.
  • the shared memory name 1202 is used for data sharing (communication) with the target application and represents the name of the shared memory 56. In the I / O performed from the shared I / F to the shared memory 56 for data sharing with the target application, the shared memory name 1202 corresponding to the target application is used.
  • FIG. 13 shows the configuration of the data mapping table 1300.
  • the data mapping table 1300 holds information such as the variable name 1301 and the position 1302 for each variable. Take one variable as an example (“target variable” in the description of FIG. 13).
  • the variable name 1301 represents the name of the variable.
  • Position 1302 represents the position of the variable value. For example, for a variable value to be data shared via the shared memory 56, the position 1302 represents the position from the beginning of the shared memory 56 and the data length.
  • system configuration information 1420 exists.
  • the system configuration information 1420 is information representing the configuration of the control system 109.
  • the system configuration information 1420 may include, for example, information input by the administrator, or information collected from the control device 40M and each arithmetic unit 40E by the control device 40M (for example, the control application 41 or another program). (For example, information including the application name) may be included.
  • the system configuration information 1420 may be stored in at least one of the control device 40M, the setting terminal 29, and the management system 101.
  • the system configuration information 1420 is, for example, a list of application names of applications existing or distributable in the control system 109, attributes of each application (whether it is a control application or an information application), and an address for each arithmetic unit 40. It may contain information representing and.
  • the expansion unit 1410 exists in the control device 40M, for example, and may include the WEB server 69. Alternatively, the expansion unit 1410 may exist in the management system 101 or the setting terminal 29.
  • the expansion unit 1410 displays the setting GUI (Graphical User Interface) 1400.
  • the setting GUI 1400 is displayed on, for example, the setting terminal 29.
  • the setting GUI 1400 is a GUI (an example of a user interface) for setting the first setting information, and is, for example, a GUI for an application developer of the control application 41.
  • the setting GUI 1400 has an input table 1450 and a setting button 1401.
  • the input table 1450 has a check box 1421 for determining whether or not to be shared, an input field 1422 for the variable name, an input field 1423 for the destination application name, and an access right input field 1424 for each variable.
  • the expansion unit 1410 may display a list of application names of the information application 42 existing or distributable in the control system 109 based on the system configuration information 1420 on the setting GUI 1400 (or on another user interface). good. Further, the system configuration information 1420 may include a part of the information included in the mapping table group 80.
  • the scanning process of the control application 41 is faster than the information processing of the information application 42. Therefore, the variable values related to the industrial equipment that is the target of data sharing and is connected to the I / O port are repeatedly updated. Therefore, it is desirable not to give the information application 42 the authority to write such variable values.
  • the cycle of the scan process of the control application 41 is shorter than the cycle of the information processing (for example, data update process) of the information application 42, it is desirable that the access right of the information application is read-only.
  • the information application 42 can read only the variable value related to the I / O port and write the result of the calculation using the variable value as the variable value of the variable set separately.
  • the information application 42 that can be written for a predetermined variable value may be limited to one.
  • the write permission of the variable value of a certain variable is only the control application 41 or only one of the three information applications 42. May be given to.
  • the expansion unit 1410 When the expansion unit 1410 receives an instruction for setting according to the content input to the input table 1450 (in the example shown in FIG. 14, when the setting button 1401 is pressed), the following (A) to (C) You may do at least one of them. In the following processing, the system configuration information 1420 is referred to by the expansion unit 1410 as necessary.
  • the expansion unit 1410 generates the first setting information 500 according to the contents input to the input table 1450, and distributes the control application 41 in which the first setting information 500 is set to the control device 40M (for example). , Deploy the control application 41 to the empty VCPU 37 of the control device 40M).
  • the first setting information 500 includes a variable name, a destination application name, and an access right for each variable to be shared.
  • the expansion unit 1410 generates the second setting information 600 according to the contents input to the input table 1450, and shares the second setting information 600 with the control application 41 (with the sharing target). At least one variable is set in the information application 42) represented by the destination application name. For example, regarding the variable name “variable 2”, the second setting information 600 for the information application 42A (app name “0001”) has the variable name “variable 2” and the destination application name “0000” (app name of the control application 41). ) And the access rights "WRITE: 0000" and "READ: 0001".
  • the second setting information 600 for the information application 42 having the application name set as the destination application name of the control application 41 includes the application name of the control application as the destination application name, and the control application 41 as an access right. Includes the same access rights as the set access rights.
  • the expansion unit 1410 generates at least the data mapping table group 82 of the mapping table group 80 according to the contents input to the input table 1450, and distributes the mapping table group 80 to each arithmetic unit 40.
  • the application mapping table group 81 in the mapping table group 80 may be generated, for example, when the power of the control device 40M is turned on.
  • the application mapping table group 81 is based on the type of communication medium between the arithmetic unit 40 at the arrangement destination of the information application 42 of the application name and the control device 40M at the arrangement destination of the control application 41 for each application name.
  • the network mapping table 1000, the bus mapping table 1100, and the memory mapping table 1200 at least a part of the information other than the application name may be the information acquired from the system configuration information 1420.
  • Each variable name of the data mapping table 1300 is a variable name of the variable to be shared in the input table 1450. In the data mapping table 1300, at least a part of the information other than the variable name may be the information determined by the expansion unit 1410 or the information acquired from the system configuration information 1420.
  • the variables to be shared data are the variables determined by the control side (in this embodiment, the variables specified via the setting GUI1400), and each of these variables is the access determined by the control side. It can only be accessed by rights. Thereby, the control having real-time property can be prioritized.
  • each table in the application mapping table group 81 may be generated by the control application 41 according to the method illustrated in FIGS. 15 to 17, for example.
  • Each table generated by the control application 41 may be distributed to each arithmetic unit 40 by the control application 41 or the expansion unit 1410.
  • the network mapping table 1000 is generated or updated as follows (in FIG. 15, "0000” is the application name of the control application 41, and "0002" and "0005" are. , Each is the application name of the information application 42 that shares data with the control application 41 via the communication network). That is, the control application "0000" periodically (or irregularly) broadcasts a request for acquiring information used for data sharing via the communication network via the network control 62.
  • the application typically the information application 42
  • the arithmetic unit 40 returns information including the application name of the application (S1502). ..
  • the control application "0000" puts the returned information (for example, only the difference) into the network mapping table 1000. Reflect (S1503). In this way, the contents of the network mapping table 1000 can be maintained up to date even if the system configuration is changed. This is useful, for example, for the variable corresponding to the destination application name "ALL" in the first setting information 500. This is because the information application 42 may be added or reduced as the arithmetic unit 40 (typically the expansion device 40E) is added or reduced to the communication network 118.
  • a predetermined method regarding the application as the data sharing partner of the application instead of or in addition to setting "ALL" as the destination application name, a predetermined method regarding the application as the data sharing partner is performed.
  • a method of setting conditions for example, application name conditions, IP address conditions may be adopted.
  • the bus mapping table 1100 is generated or updated as follows (in FIG. 16, “0000” is the application name of the control application 41, and “0003” and “0007” are. , Each is the application name of the information application 42 that shares data via the control application 41 and the PIO bus 28). That is, each of the control application "0000” and the information applications “0003” and “0007” perform initialization processing (S1600). In the initialization process (S1600) of the control application 41, the control application 41 has the application name "0000” of the control application 41 and the application names "0003” and "0003” of the information application 42 of the data sharing partner in the control sharing I / F 36. 0007 ”is taught.
  • the information application 42 (for example, the information application “0003”) also has its own application name “0003” and a control application of the data sharing partner in the information sharing I / F37 in the initialization process (S1600) of the information application 42. Teach the app name "0000". In such an initialization process, both the control sharing I / F 36 and the information sharing I / F 37 can know the application name of the other party's application that shares data via the PIO bus 28.
  • the control application "0000" transfers information (information including the application name and bus number) used for data sharing via the PIO bus 28 to one or more expansion devices connected to the PIO bus 28. Received from each of the 40E information applications "0003" and "0007", for example, via a communication network (S1601).
  • the control application "0000” reflects the received information in the bus mapping table 1100 (S1602).
  • the memory mapping table 1200 is generated or updated as follows (in FIG. 17, “0000” is the application name of the control application 41, and “0001” and “0008” are , Each is the application name of the information application 42 that shares data via the control application 41 and the shared memory 56). That is, each of the control application "0000” and the information applications “0001” and “0008” perform the initialization process (S1600). In this initialization process, both the control sharing I / F 36 and the information sharing I / F 37 can know the application name of the other party's application that shares data via the shared memory 56.
  • control application "0000” uses the information (information including the application name and the shared memory name) used for data sharing via the shared memory 56 as the information applications “0001" and "0001" of the same control device 40M. Received from each of 0008 “(S1701). The control application "0000” reflects the received information in the memory mapping table 1200 (S1702).
  • variable name of the variable to be shared between the control application 41 and the information application 42A is referred to as "variable 1”
  • the variable value of the variable "variable 1” is referred to as "variable value 1”
  • the variable name of the variable to be shared between the control application 41 and the information application 42B is "variable 2”
  • the variable value of the variable "variable 2” is called “variable value 2”.
  • variable name of the variable to be shared between the control application 41 and the information application 42C is "variable 3"
  • variable value of the variable "variable 3” is called “variable value 3”.
  • control application 41 is the only application that has write permission for each of the variables "variable 1" to "variable 3".
  • the control application 41 writes the variable values 1 to 3 to the work memory 152 (a part of the memory 169 (see FIG. 1)) in the scan process every control cycle.
  • the control application 41 designates the writing of the variable values 1 to 3 written in the work memory 152 during or after the scanning process to the control sharing I / F 36 for each control cycle.
  • data sharing of each of the variable values 1 to 3 will be described.
  • the control application 41 specifies the variable name "variable 1" and the destination application name "0001" (app name of the information application 42A) corresponding to the variable name "variable 1" from the first setting information 500, and also It is specified from the first setting information 500 that oneself has write authority.
  • the control application 41 makes an I / O designation with "variable 1" and "0001" as arguments to the control sharing I / F36, respectively.
  • the I / O designation is a designation for writing the variable value 1.
  • the control I / F unit 701 receives the I / O designation.
  • the control sharing unit 702 refers to the application mapping table group 81X in the mapping table group 80X using the argument "0001" specified by the I / O as a key, so that the data sharing of the variable value 1 is via the shared memory 56. And, the information necessary for data sharing via the shared memory 56 is specified. Further, the control sharing unit 702 specifies the position of the write destination of the variable value 1 by referring to the data mapping table group 82X in the mapping table group 80X using the argument "variable 1" specified by the I / O as a key. .. The control sharing unit 702 writes the variable value 1 at the specified writing destination position using the specified information necessary for data sharing via the shared memory 56.
  • the information application 42A identifies the variable name "variable 1" and the destination application name "0000" (app name of the control application 41) corresponding to the variable name "variable 1" from the second setting information 600A. Further, it is specified from the second setting information 600A that oneself has the read authority.
  • the information application 42A specifies I / O with "variable 1" and "0000" as arguments to the information sharing I / F37A.
  • the I / O designation is a read designation of the variable value 1.
  • the information I / F unit 801A receives the I / O designation.
  • the information sharing unit 802A refers to the application mapping table group 81X in the mapping table group 80X using the argument "0000" specified by the I / O as a key, so that the data sharing of the variable value 1 is via the shared memory 56. And, the information necessary for data sharing via the shared memory 56 is specified. Further, the information sharing unit 802A specifies the position of the variable value 1 by referring to the data mapping table group 82X in the mapping table group 80X using the argument "variable 1" specified by the I / O as a key. The information sharing unit 802A reads the variable value 1 from the specified position using the specified information necessary for data sharing via the shared memory 56. The read variable value 1 returns to the information application 42A from the information I / F unit 801A of the information sharing I / F37A in response to the I / O designation.
  • variable value 1 is shared between the control application 41 and the information application 42A.
  • the control application 41 specifies the variable name "variable 2" and the destination application name "0003" (app name of the information application 42B) corresponding to the variable name "variable 2" from the first setting information 500, and also It is specified from the first setting information 500 that oneself has write authority.
  • the control application 41 makes an I / O designation with "variable 2" and "0003" as arguments to the control sharing I / F36.
  • the I / O designation is a designation for writing the variable value 2.
  • the control I / F unit 701 receives the I / O designation.
  • the control sharing unit 702 refers to the application mapping table group 81X in the mapping table group 80X using the argument "0003" specified by the I / O as a key, so that the data sharing of the variable value 2 is via the PIO bus 28. And, the information necessary for data sharing via the PIO bus 28 is specified. Further, the control sharing unit 702 specifies the position of the write destination of the variable value 2 by referring to the data mapping table group 82X in the mapping table group 80X using the argument "variable 2" specified by the I / O as a key. .. The control sharing unit 702 sends an I / O for writing the variable value 2 to the specified position to the PIO bus control 61A by using the specified information necessary for data sharing via the PIO bus 28. conduct. The PIO bus control 61A outputs the variable value 2 to the PIO bus 28 according to the I / O. The output variable value 2 is sent to, for example, the PIO bus control 61B of the expansion device 40E1.
  • the information application 42B identifies the variable name "variable 2" and the destination application name "0000" (app name of the control application 41) corresponding to the variable name "variable 2" from the second setting information 600B. Further, it is specified from the second setting information 600B that oneself has the read authority.
  • the information application 42B specifies I / O with "variable 2" and "0000" as arguments to the information sharing I / F37B.
  • the I / O designation is a read designation of the variable value 2.
  • the information I / F unit 801B receives the I / O designation.
  • the information sharing unit 802B refers to the application mapping table group 81Y in the mapping table group 80Y using the argument "0000" specified by the I / O as a key, so that the data sharing of the variable value 2 is via the PIO bus 28. And, the information necessary for data sharing via the PIO bus 28 is specified. Further, the information sharing unit 802B specifies the position of the variable value 2 by referring to the data mapping table group 82Y in the mapping table group 80Y using the argument "variable 2" specified by the I / O as a key. The information sharing unit 802B performs I / O for reading the variable value 2 from the specified position to the PIO bus control 61B using the specified information necessary for data sharing via the PIO bus 28.
  • the PIO bus control 61B returns the variable value 2 via the PIO bus 28 to the information sharing I / F37B.
  • the variable value 2 returns to the information application 42B from the information I / F unit 801B of the information sharing I / F37B in response to the I / O designation.
  • variable value 2 is shared between the control application 41 and the information application 42B.
  • the control application 41 specifies the variable name "variable 3" and the destination application name "0002" (app name of the information application 42C) corresponding to the variable name "variable 3" from the first setting information 500, and also It is specified from the first setting information 500 that oneself has write authority.
  • the control application 41 makes an I / O designation with "variable 3" and "0002" as arguments to the control sharing I / F36, respectively.
  • the I / O designation is a designation for writing the variable value 3.
  • the control I / F unit 701 receives the I / O designation.
  • the control sharing unit 702 refers to the application mapping table group 81X in the mapping table group 80X using the argument "0002" specified by the I / O as a key, so that the data sharing of the variable value 3 is via the communication network 118. And identify the information required for data sharing via the communication network 118. Further, the control sharing unit 702 specifies the position of the write destination of the variable value 3 by referring to the data mapping table group 82X in the mapping table group 80X using the argument "variable 3" specified by the I / O as a key. .. The control sharing unit 702 performs I / O for writing the variable value 3 at the specified position to the network control 62A by using the specified information necessary for data sharing via the communication network 118. The network control 62A outputs the variable value 3 to the communication network 118 according to the I / O. The output variable value 3 is sent to, for example, the network control 62B of the expansion device 40E2.
  • the information application 42C identifies the variable name "variable 3" and the destination application name "0000" (app name of the control application 41) corresponding to the variable name "variable 3" from the second setting information 600C. Further, it is specified from the second setting information 600C that oneself has the read authority.
  • the information application 42C specifies I / O with "variable 3" and "0000" as arguments to the information sharing I / F37C.
  • the I / O designation is a read designation of the variable value 3.
  • the information I / F unit 801C receives the I / O designation.
  • the information sharing unit 802C refers to the application mapping table group 81Z in the mapping table group 80Z using the argument "0000" specified by the I / O as a key, so that the data sharing of the variable value 3 is via the communication network 118. And identify the information required for data sharing via the communication network 118. Further, the information sharing unit 802C specifies the position of the variable value 3 by referring to the data mapping table group 82Z in the mapping table group 80Z using the argument "variable 3" specified by the I / O as a key. The information sharing unit 802C performs I / O for reading the variable value 3 from the specified position to the network control 62B by using the specified information necessary for data sharing via the communication network 118.
  • the network control 62B returns the variable value 3 via the communication network 118 to the information sharing I / F37C.
  • the variable value 3 returns to the information application 42C from the information I / F unit 801C of the information sharing I / F37C in response to the I / O designation.
  • variable value 3 is shared between the control application 41 and the information application 42C.
  • the writer is the control application 41 and the reader is the information application 42 for any of the variable values 1 to 3, but the data sharing method is substantially the same even if the writer and the reader are reversed. be.
  • the application is appropriately rearranged according to the system configuration change.
  • the second embodiment will be described.
  • the differences from the first embodiment will be mainly described, and the common points with the first embodiment will be omitted or simplified.
  • FIG. 19 shows an example of the control system according to the second embodiment before the system configuration change.
  • FIG. 20 shows an example of the control system according to the second embodiment after the system configuration change.
  • each arithmetic unit 40 has an overall configuration table 191 representing the configuration of the control system 2109 and an individual configuration table 192 representing the configuration of the arithmetic unit 40.
  • the overall configuration table 191 is information in which the individual configuration tables 192 of all the arithmetic units 40 are aggregated. Specifically, the overall configuration table 191 indicates whether or not the arithmetic unit 40 has RT property (real-time property) for each of the plurality of arithmetic units 40, and one or more interface devices possessed by the arithmetic unit 40. Contains information.
  • the individual configuration table 192 includes information indicating whether or not the arithmetic unit 40 has RT property and one or more interface devices possessed by the arithmetic unit 40.
  • all the arithmetic units 40 share the overall configuration table 191.
  • the overall configuration table 191 is shared by all the control devices 40M (an example of some arithmetic units 40) and shared by the expansion device 40E. It does not have to be done.
  • the overall configuration table 193 is a computer system communicably connected to the management system 101 (a computer system communicably connected to at least one of a plurality of arithmetic units 40). It may be stored in (1 example).
  • each arithmetic unit 40 has an arrangement control unit 67 that controls the arrangement of application programs.
  • the arrangement control unit 67 is realized by executing a predetermined computer program on the CPU.
  • the arrangement control unit 67 is provided in each arithmetic unit 40, but the arrangement control unit 67 is provided in each control device 40M and is provided in the expansion device 40E. It may not be provided, or may be provided in the management system 101 in place of (or in addition to) the arithmetic unit 40.
  • the arrangement control unit 67 of the control device 40M1 is the arrangement control unit 67M1 of the master
  • the arrangement control unit 67 of each expansion device 40E is the arrangement control unit 67E of the slave.
  • the placement control unit 67M1 makes the first determination as to whether or not the control application 41 needs to be rearranged.
  • the arrangement control unit 67M determines the control application 41B to be rearranged from one or more control applications 41, and controls the rearrangement target based on the overall configuration table 191.
  • the placement destination of the application 41B is determined to be the control device 40M2 having the RT property and the interface device used by the control application 41B, and the control application 41B is placed in the control device 40M2 instead of the control device 40M1.
  • the arrangement control unit 67M1 migrates the VCPU37B of the control application 41B from the control device 40M1 to the control device 40M2, and arranges the control application 41B in the migrated VCPU37B. May be good.
  • the arrangement control unit 67M1 may relocate (arrange) the control application 41B from the control device 40M1 to the control device 40M2 by expanding the image of the VCPU 37B including the control application 41B to the control device 40M2. ..
  • the arrangement control unit 67M1 makes the above-mentioned first determination (determination of the necessity of relocation of the control application 41).
  • the trigger for making the first determination may be that the decrease in the arithmetic unit 40 is detected.
  • the increase or decrease of the arithmetic unit 40 means that the hardware resources of the control system are increased or decreased, and as a result, the application arrangement is not optimal. Since the control application 41 (and the information application 42) is rearranged at such an opportunity, an appropriate application arrangement can be maintained.
  • the "decrease in the arithmetic unit 40" may mean that the arithmetic unit 40 is stopped in place of or in addition to the removal of the arithmetic unit 40 from the control system, due to the occurrence of a failure or another reason.
  • the arrangement control unit 67M1 can display the configuration management GUI 2101 exemplified in FIGS. 21 and 22 on, for example, the setting terminal 29.
  • FIG. 21 shows an example of a configuration management GUI for a control system (control system shown in FIG. 19) before the system configuration change.
  • FIG. 22 shows an example of a configuration management GUI for a control system (control system shown in FIG. 20) after the system configuration has been changed.
  • the configuration management GUI 2101 displays which control application 41 and which information application 42 is arranged in which arithmetic unit 40.
  • the configuration management GUI 2101 has a plurality of display objects 21 each representing a plurality of arithmetic units 40 specified from the overall configuration table 191.
  • "1-0" and "1-1" are IDs of the arithmetic unit 40 (node IDs described later).
  • the display object 21 of the arithmetic unit 40 has a display object 22 of the VCPU 37 arranged in the arithmetic unit 40.
  • the display object 22 of the VCPU 37 has a display object 23 of the control application 41 or the information application 42 arranged in the VCPU 37.
  • the user can understand the control system configuration including the application layout from the configuration management GUI 2101 from a bird's-eye view.
  • the configuration management GUI 2101 is a first UI (for example, a GUI component) that accepts the selection of the arithmetic unit 40, a second UI that accepts an instruction to add a VCPU to the selected arithmetic unit 40, and an application to be inserted in the added VCPU 37. It may have a third UI that accepts selections.
  • the selection of the arithmetic unit 40 may be to specify (for example, click) the display object 21 of the arithmetic unit 40, or to specify the ID or IP address of the arithmetic unit 40 (for example, click or manually input). ..
  • To add a VCPU the number of VCPUs 37 to be added may be input.
  • the layout control unit 67M1 displays the free hardware specifications (for example, the types and amounts of free resources of various calculation resources) specified based on the overall configuration table 191 for each arithmetic unit 40 on the configuration management GUI 2101. You may. Further, when the arrangement control unit 67M1 accepts the selection of the control application 41 or the information application 42, the hardware specifications required by the selected application are specified from, for example, the application table 2400 (see FIG. 24) described later. An arithmetic unit 40 having an empty hardware specification satisfying the specified hardware specifications may be specified based on the overall configuration table 191 and the display object 21 of the specified arithmetic unit 40 may be highlighted. As a result, for example, the following can be expected.
  • the free hardware specifications for example, the types and amounts of free resources of various calculation resources
  • the user arranges the information application 42 after the arrangement of the control application 41, but the user can use the configuration management UI 2101 to detail the configuration of the control system 2109 (for example, the individual arithmetic unit 40.
  • the information application 42 can be introduced into the control system 2109 without being aware of the hardware specifications.
  • FIG. 23 shows the configuration of the overall configuration table 191.
  • the overall configuration table 191 is held in each arithmetic unit 40, but may be held in place of or in addition to the management system 101.
  • the overall configuration table 191 has a record for each arithmetic unit 40.
  • the entire information included in the record for each arithmetic unit 40 corresponds to the individual configuration table 192 of the arithmetic unit 40.
  • Each record holds information such as IP address 1911, node ID 1912, device type 1913, RT property 1914, fastest control cycle 1915, CPU 1916, memory 1917, IO 1918, and application name 1919. Taking one arithmetic unit 40 as an example (“target device” in the description of FIG. 23).
  • IP address 1911 represents the IP address of the target device.
  • Node ID 1912 represents the ID of the target device.
  • node is meant an arithmetic unit as an element in a control system as a distributed system.
  • the configuration of the node ID is "PQ".
  • P is an identification number of the PIO bus 28 (see FIGS. 1 and 2) (P is a natural number).
  • Q is a serial number of the arithmetic unit connected to the PIO bus 28 (Q is an integer of 0 or more).
  • the arithmetic unit with Q> 0 is the expansion device 40E.
  • the closer Q is a natural number, the closer the expansion device 40E is to the control device 40M in terms of distance.
  • Q may be, for example, the number of the connector (slot) provided on the backboard.
  • one PIO bus 28 has one control device 40M, and a plurality of different PIO buses 28 have a plurality of different control devices 40M. Communication between devices 40 existing on different PIO buses 28 is possible via the communication network 118.
  • the device type 1913 indicates whether the target device is the control device 40M or the expansion device 40E. In the present embodiment, since it is possible to specify whether the target device is the control device 40M or the expansion device 40E from the node ID 1912, the device type 1913 may not be necessary, but a plurality of control devices 40M may be included in one PIO bus 28. Device type 1913 is useful for systems to which can be connected.
  • RT property 1914 indicates whether or not the target device has RT property (performance that satisfies RT property). “Yes” means that there is RT property, and “No” means that there is no RT property.
  • the fastest control cycle 1915 represents the shortest control cycle that the target device can handle (cover). For example, when the fastest control cycle 1915 of the target device is "1 ms", an application having a control cycle of "1 ms" or longer may be placed in the target device.
  • the CPU 1916 is an example of information representing the hardware specifications of the target device, and represents the specifications of the CPU possessed by the target device.
  • the CPU spec may include other factors such as the number of CPU cores in addition to the number of clocks.
  • the memory 1917 is an example of information representing the hardware specifications of the target device, and represents the capacity of the memory of the target device.
  • IO1918 is an example of information representing the hardware specifications of the target device, and represents the type of the interface device (for example, I / O module 119) possessed by the target device.
  • the application name 1919 represents the name of the application placed on the target device.
  • FIG. 24 shows the configuration of the application table 2400.
  • the application table 2400 may also be held in each arithmetic unit 40 or may be held in the management system 101.
  • the application table 2400 holds information such as RT property 2411, control cycle 2412, required CPU 2413, required memory 2414, and used IO 2415, in addition to the application name 901 and the communication medium type 902, for each application existing in the control system 109. Take one app as an example (“target app” in the description of FIG. 24).
  • RT property 2411 indicates whether or not RT property is required for the target application. “Yes” means that RT property is required, and “None” means that RT property is not required.
  • the application with RT property 2411 "Yes” is the control application 41, and the application with RT property 2411 "No” is the information application 42.
  • the control cycle 2412 represents a control cycle required for the target application.
  • the control cycle is a time composed of a scan time, which is the time required for the scan process, and a standby time, which is a time other than the scan time. Information processing by the information application 42 is performed during the waiting time. Therefore, the "control cycle required for the target application" differs depending on whether the target application is the control application 41 or the information application 42. Specifically, it is as follows. -When the target application is the control application 41, the "control cycle required for the target application" is a control cycle determined in consideration of the scan time of the scan process performed by the execution of the control application 41. be.
  • the "control cycle required for the target application” considers the expected waiting time based on the processing time of the information processing performed by the execution of the information application 42. It is a control cycle defined in the above. The length of the wait time depends on the control cycle and the scan time. Therefore, for example, for the information application 42, the "control cycle required for the target application” may be determined based on the processing time of information processing by the information application 42 and the maximum scan time.
  • the required CPU 2413 is an example of the hardware specifications required for the target application, and represents the CPU specifications required for the target application.
  • the required memory 2414 is an example of the hardware specifications required for the target application, and represents the memory specifications required for the target application.
  • the usage IO2415 is an example of the hardware specifications required for the target application, and represents the type of interface device used by the target application.
  • the application whose application name 901 is "0000" is a control application 41 because the RT property 2411 is "Yes”.
  • the arrangement control unit 67M1 identifies a record having an RT property 1914 “Yes” and an IO 1918 suitable for the use IO 2415 of this control application 41 from the overall configuration table 191 and outputs a node ID 1912 “1-0” from the record. Identify.
  • the arrangement control unit 67M1 arranges the control application 41 on the control device 40M corresponding to the specified node ID 1912 “1-0”. Specifically, for example, the arrangement control unit 67M1 may perform the following processing.
  • the arrangement control unit 67M1 may specify the hardware specifications (for example, CPU specifications and memory specifications) required by the control application 41 of the application name 901 “0000” from the application table 2400.
  • the arrangement control unit 67M1 may specify an empty hardware specification of the target device from the overall configuration table 191.
  • the target device is a control device 40M (that is, a control device 40M corresponding to the node ID 1912 “1-0”) corresponding to the RT property 1914 “Yes” and the IO 1918 compatible with the use IO 2415 of the control application 41.
  • the free hardware spec may be specified based on, for example, the hardware spec of the target device (for example, the CPU spec and the memory spec) and the total of the required hardware specs of all the applications arranged in the target device.
  • the arrangement control unit 67M1 determines whether or not the free hardware specifications specified in S2 satisfy the required hardware specifications specified in S1. Free hardware specs for all resource types If the required hardware specs are met, the judgment result may be true. On the other hand, if the free hardware specs for at least one resource type do not meet the required hardware specs, the determination result may be false.
  • S4 When the determination result of S3 is true, the arrangement control unit 67M1 arranges the control application 41 on the target device.
  • the target device after the change may be any of the following. -Another control device 40M corresponding to RT property 1914 "Yes” and IO1918 compatible with the use IO2415 of this control application 41. -Of the expansion devices 40E connected to the same PIO bus 28 as the control device 40M corresponding to the node ID 1912 "1-0" and not selected as the target device, the expansion device 40E closest to the control device 40M.
  • both the control device 40M and the expansion device 40E can dynamically enter or leave the control system through the transmission and reception of messages from each other.
  • the entire configuration table 191 is updated by sharing the individual configuration table 192 of the newly gathered arithmetic units 40 with all the existing arithmetic units 40.
  • the arrangement control unit 67 (or the user) determines the optimum arrangement of the control application 41 and the information application 42 based on the overall configuration table 191 and arranges those applications at the determined optimum arrangement destination.
  • FIG. 25 shows an example of the process of updating the overall configuration table 191.
  • the existing node 1-0 is the control device 40M1.
  • the existing node 2-0 is a control device 40M2.
  • the new gathering node 1-1 is the expansion device 40E11.
  • the arithmetic unit is referred to as a "node" for convenience.
  • the processing of S2501 to S2512 described below is performed by the arrangement control unit 67 in the node, but in order to simplify the explanation, the processing subject is set as the node.
  • Node 1-1 broadcasts the entry notification via the PIO bus 28 (S2501). As a result, node 1-0 connected to the PIO bus 28 detects the entry of node 1-1.
  • Node 1-0 broadcasts the entry notification of new entry of node 1-1, for example, via network 118.
  • node 2-0 as an example of the control device connected to the network 118 detects the new entry of node 1-1.
  • Node 1-0 returns the entry response to the entry notification of S2501 to node 1-1 (S2503).
  • Node 1-1 transmits the individual configuration table 192 of node 1-1 to node 1-0, which is the source of the entry response (S2504).
  • Node 1-0 adds the individual configuration table 192 of node 1-1 to the global configuration table 191 of node 1-0, that is, updates the global configuration table 191 of node 1-0 (S2505).
  • Node 1-0 transmits the individual configuration table 192 of node 1-0 to node 1-1 (S2506).
  • Node 1-1 adds the individual configuration table 192 of node 1-0 to the overall configuration table 191 of node 1-1, that is, updates the overall configuration table 191 of node 1-1 (S2507).
  • the flow of updating the overall configuration table 191 is not limited to the flow shown in FIG. 25 as an example.
  • the following flow may be adopted. That is, in S2506, the node 1-0 transmits the updated overall configuration table 191 including the individual configuration table 192 from the newly gathered node 1-1 to the node 1-1. Node 1-1 holds the overall configuration table 191 as the overall configuration table 191 of node 1-1. S2502 and S2508 to S2512 are not performed.
  • node 1-1 is a new exit node
  • the following processing may be performed. That is, node 1-0 detects the new departure of node 1-1 and removes the record corresponding to node 1-1 from the overall configuration table 191.
  • Node 1-0 transmits the updated overall configuration table 191 to each node specified from the updated overall configuration table 191. If there is a node that is not connected to the PIO bus to which node 1-0 is connected and is not connected to the network 118, the node is connected to the PIO bus to which the node is connected.
  • the updated overall configuration table 191 may be transmitted through any of the connected network connection nodes (nodes connected to network 118 (eg, control device 40M)).
  • FIG. 26 shows an example of the application placement control process.
  • the application placement control process determines whether or not the application placement is optimal (for example, at least one of S2601 and S2602), and the application rearrangement performed when the result of the judgment is false (for example, at least one of S2605 and S2608). ) And.
  • the application placement control process may be performed after any one of the increase and decrease of the arithmetic unit 40 is detected and the update of the overall configuration table 191 is completed.
  • the arithmetic unit 40 that increases or decreases specified from the updated overall configuration table 191 may be, for example, as follows.
  • the increased arithmetic unit 40 is an arithmetic unit 40 in which the application name 1919 is blank, or an arithmetic unit 40 in which an increase flag (not shown) is set in the overall configuration table 191 as, for example, the application name 1919.
  • the arithmetic unit 40 to be reduced is an arithmetic unit 40 in which a reduction flag (not shown) is set in the overall configuration table 191 as, for example, the application name 1919.
  • the application placement control process may be performed by any placement control unit 67 existing in the control system 2109, but in the following description, the placement control of any control device 40M that has detected an increase or decrease in the arithmetic unit 40. Part 67M will do it.
  • the arrangement control unit 67M determines whether or not there is an arithmetic unit 40 having an RT property of 1914 “yes” as the increased arithmetic unit 40 (S2600). When the determination result of S2600 is true, the determination of S2601 (determination of whether or not the relocation of the control application 41 is necessary) is performed. This is because when the increased arithmetic unit 40 is an arithmetic unit 40 having an RT property of 1914 "Yes", it is expected that it is preferable to relocate the control application 41 to the increased arithmetic unit 40 from the viewpoint of load balancing or other viewpoints. be.
  • the arrangement control unit 67M determines whether or not the relocation of the control application 41 is necessary (S2601).
  • the case of "relocation of the control application 41 is necessary" may be any of the following, for example. -As the increased arithmetic unit, there is an arithmetic unit 40 having an RT property of 1914 "Yes", and there are a plurality of control applications 41 in the same arithmetic unit. -The application name 1919 corresponding to the decreasing arithmetic unit includes the application name of the control application 41 which is an application having RT property 2411 "Yes".
  • control application 41 to be rearranged determines the control application 41 to be rearranged (S2603).
  • the "control application 41 to be rearranged" may be, for example, any of the following.
  • -A control application located in the arithmetic unit 40 which has relatively few free hardware specifications.
  • the placement control unit 67M sets the placement destination of the control application 41 to be relocated to the RT property 1914 “Yes” and the use IO2415 of the control application 41 to be relocated based on the overall configuration table 191.
  • the arrangement control unit 67M arranges the control application 41 to be rearranged in the arithmetic unit determined in S2604 instead of the arithmetic unit 40 in which the control application 41 is arranged (S2605).
  • the arrangement control unit 67M presents information indicating the determination contents of S2603 and S2604 (the control application to be relocated and the relocation destination thereof) to the user, and may perform S2605 when the user approves. good.
  • the arrangement control unit 67M may automatically perform S2605 without presenting such information to the user. After that, the process returns to S2601.
  • the arrangement control unit 67M determines the information application 42 to be rearranged (S2606).
  • the "information application 42 to be relocated" may be, for example, any of the following. -An information application located in the arithmetic unit 40, which has relatively few free hardware specifications. -An information application of any of a plurality of control applications arranged in the same arithmetic unit 40. -Information apps located in the decreasing arithmetic unit.
  • the placement control unit 67M calculates the placement destination of the information application 42 to be relocated based on the overall configuration table 191 to have an empty hardware specification that satisfies the hardware specifications required by the information application 42. Determined by the device (S2607).
  • the arrangement control unit 67M arranges the information application 42 to be rearranged in the arithmetic unit determined in S2607 instead of the arithmetic unit 40 in which the information application 42 is arranged (S2608). As a result, the optimum arrangement of the information application 42 in addition to the control application 41 can be maintained.
  • the arrangement control unit 67M presents, for example, information indicating the determination contents of S2606 and S2607 (the information application to be relocated and the relocation destination thereof) to the user, and performs S2608 when the user approves. You may. Alternatively, the arrangement control unit 67M may automatically perform S2609 without presenting such information to the user. After that, the process returns to S2601.
  • the overall configuration table 191 may be shared by each control device 40M. Then, each control device 40M may have an arrangement control unit 67.
  • the control device 40M is typically an arithmetic unit having an interface device to which the controlled device 12 is connected, in addition to the RT property. Therefore, typically, the control app 41 is arranged in the control device 40M, and as a result, the control device 40M controls the control target device 12. Since such a control device 40M can control the execution timing of the application relocation control process, the optimum application arrangement can be maintained within the range of maintaining the RT property.
  • the arrangement control unit 67 may be provided in the management system 101, which is an example of the computer system communicably connected to at least one of the plurality of arithmetic units 40.
  • the overall configuration table 191 may be held in the management system 101. As a result, it is possible to centrally manage and control the application arrangement in each of the plurality of control systems provided in the plurality of locations such as the plurality of factories 10.
  • a shared I / F shared interface
  • the shared I / F is a layer I / F higher than the I / F for shared memory generally provided by the OS.
  • the shared I / F accepts I / O specifications (for example, function call) from the application, but if the name of the destination application and the name of the data item of the shared data are used as arguments in the I / O specification.
  • I / O specifications for example, function call
  • each arithmetic unit 40 has a shared I / F.
  • the existence of the shared I / F enables data sharing without the need for the application to be aware of the type of communication medium. Therefore, for the control system 2109, which can use at least one of the communication network 118 and the PIO bus 28 for data sharing between applications in addition to the shared memory 56, system configuration changes including application relocation can be controlled. It can be done flexibly while maintaining real-time performance.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Abstract

コントロールシステムが、制御プログラムの再配置が必要か否かの判定を行う。当該判定の結果が真の場合、コントロールシステムが、一つ又は複数の制御プログラムから再配置対象の制御プログラムを決定し、全体構成情報(複数の演算装置の各々について当該演算装置がリアルタイム性を有するか否かと当該演算装置が有する一つ以上のインターフェースデバイスとを表す情報を含んだ情報)を基に、再配置対象の制御プログラムの配置先を、リアルタイム性と再配置対象の制御プログラムが利用するインターフェースデバイスとを有する演算装置に決定し、再配置対象の制御プログラムを、当該制御プログラムが配置されている演算装置に代えて、決定された演算装置に配置する。

Description

コントロールシステム
 本発明は、概して、コントロールシステムに関する。
 コントロールシステム(特に、産業機器の制御のためのコントロールシステム)を、複数の演算装置で構成された分散システムとし、複数の演算装置が複数のコンピュータプログラムを実行することが考えられる。例えば特許文献1は、分散システムのプログラム管理方法を開示している。特許文献1は、「コントローラにモジュール(あるいはサブルーチン)単位で制御プログラムを実行させるモジュール実行機構を持たせ、コントローラの複数台をネットワークで接続した分散システムに、共通のモジュールが搭載されているコントローラ群にモジュールの修正したものをネットワークを介してダウンロードすることによってモジュールを一括変更するプログラム管理装置を付加した分散システムのプログラム管理方法。」を開示する。
特開平7-210394号公報
 コントロールシステムは、少なくとも一つのコントロール装置を含む。コントロール装置は、少なくとも一つの制御プログラムが配置された演算装置である。一般に、コントロール装置の役割は、制御プログラムを周期的に実行することで、制御対象装置(例えば、産業機器)を遅延無く制御することにある。演算装置は、プロセッサ及びメモリといったハードウェア資源を有するが、役割を担うのに必要なハードウェア資源は、一般的な計算機のハードウェア資源に比べて少なくて済むため、通常、コントロールシステムの構成要素とされる演算装置のハードウェア資源の量は、一般的な計算機に比べて少ない。制御対象装置は、典型的には産業機器であり、産業機器は、一般的な計算機に比べて工場等の製造ラインで長期間動作されることが期待されるため、CPU等の冷却に用いるファン等を搭載できない等の制約があるからである。
 制御対象装置の制御に必要な情報(例えば、センサによる測定値)を取得するための通信を制御プログラムによる制御の一部とすること(すなわち、通信について制御プログラムに記述されていること)が考えられるが、通信のような情報処理は制御プログラムによる制御とは分離しておくことが望ましいと考えられる。そのように考えられる1つの理由は、コントロール装置の制御対象装置は、一般に、工作機械、自動組み立て装置又は自動搬送装置のような自動機械や生産設備であるため、高い安定性、つまりリアルタイム性が求められるためである。
 そこで、制御プログラムに加えて、通信のような情報処理について記述されたプログラムである情報プログラムを用意しておくことが考えられる。
 制御プログラムは、予め指定された制御周期毎にスキャン処理を行う。「スキャン処理」は、I/O(Input/Output)ポートに接続された機器の情報を読み込むことと、読み込んだ情報を演算することと、演算した情報を書き込むこととを含んだ処理である。スキャン処理に要する時間であるスキャンタイムと、スキャンタイム以外の時間である待機時間とで構成された時間を、「制御周期」(又は「制御プログラムの処理周期」)という。
 情報プログラムは、制御プログラムの処理周期とは異なる処理周期で動作することもできるし、必ずしも周期的に動作しなくてもよい。また、情報プログラムは、制御プログラムの処理周期のうちの待機時間(例えば、制御プログラムがハードウェアリソースを利用していない時間)に、当該情報プログラムの処理を実行することもできる。
 リアルタイム性を維持するために制御プログラムを優先するべく、演算装置をコントロールシステムに増設し、増設された演算装置で情報プログラムを実行することが考えられる。この場合、制御プログラムが実行される演算装置とは別の演算装置で情報プログラムが実行されるので、当該情報プログラムは、制御プログラムの待機時間以外の時間、例えば、スキャン処理が行われている時間に、処理を行ってもよい。
 一方、資源節約の観点から、制御プログラムと情報プログラムの両方を一つの演算装置で実行することが考えられる。
 リアルタイム性を維持しつつこのようなシステム構成変更(例えば、演算装置の増設又は減設に伴いプログラムの配置先の演算装置を変更すること)を柔軟に行えることが望ましい。
 一つ又は複数の制御対象装置を制御するコントロールシステムが、それぞれがインターフェース装置、記憶装置及びそれらに接続されたプロセッサを有する複数の演算装置と、プログラムの配置を制御する配置制御部とを備える。複数の演算装置の各々について、当該演算装置のインターフェース装置は、当該演算装置が有する一つ以上のインターフェースデバイスである。複数の演算装置は、一つ又は複数の制御プログラムと、一つ又は複数の情報プログラムとを有する。一つ又は複数の制御プログラムの各々について、当該制御プログラムは、当該制御プログラムについて定められた制御周期毎に、制御対象装置を制御する処理でありリアルタイム性を有する処理であるスキャン処理を当該制御周期内に行うプログラムである。一つ又は複数の情報プログラムの各々について、当該情報プログラムは、当該情報プログラムについて定められた情報処理を行うプログラムである。配置制御部が、制御プログラムの再配置が必要か否かの判定を行う。当該判定の結果が真の場合、配置制御部が、一つ又は複数の制御プログラムから再配置対象の制御プログラムを決定し、全体構成情報(複数の演算装置の各々について当該演算装置がリアルタイム性を有するか否かと当該演算装置が有する一つ以上のインターフェースデバイスとを表す情報を含んだ情報)を基に、再配置対象の制御プログラムの配置先を、リアルタイム性と再配置対象の制御プログラムが利用するインターフェースデバイスとを有する演算装置に決定し、再配置対象の制御プログラムを、当該制御プログラムが配置されている演算装置に代えて、決定された演算装置に配置する。
 本発明によれば、リアルタイム性を必要とする制御を行うコントロールシステムのシステム構成変更を、リアルタイム性を維持しつつ柔軟に行うことができる。
第1の実施形態に係るコントロールシステムを含むシステムの物理構成の一例を示す。 コントロールシステムの論理構成の一例を示す。 PIOバス制御の構成を示す。 ネットワーク制御の構成を示す。 制御アプリの設定情報の一例を示す。 情報アプリの設定情報の一例を示す。 制御共有I/Fの構成を示す。 情報共有I/Fの構成を示す。 アプリテーブルの構成を示す。 ネットワークマッピングテーブルの構成を示す。 バスマッピングテーブルの構成を示す。 メモリマッピングテーブルの構成を示す。 データマッピングテーブルの構成を示す。 制御アプリの設定情報の設定に関する処理の一例を示す。 ネットワークマッピングテーブルの生成又は更新の処理の一例を示す。 バスマッピングテーブルの生成又は更新の処理の一例を示す。 メモリマッピングテーブルの生成又は更新の処理の一例を示す。 アプリ間のデータ共有の流れの一例を示す。 システム構成変更前の第2の実施形態に係るコントロールシステムの一例を示す。 システム構成変更後の第2の実施形態に係るコントロールシステムの一例を示す。 システム構成変更前の構成管理GUIの一例を示す。 システム構成変更後の構成管理GUIの一例を示す。 全体構成テーブルの構成を示す。 第2の実施形態に係るアプリテーブルの構成を示す。 全体構成テーブルの更新の処理の一例を示す。 アプリ配置制御処理の一例を示す。
 本発明の一実施形態に係る産業用のコントロールシステムは、一つ以上の産業用のコントロール装置を備える。当該コントロールシステムは、典型的には、更に、コントロール装置とハードウェアリソース(例えば、コントロール装置のI/Oポート)を共有し制御プログラムまたは情報プログラムを配置する拡張装置を備えることができる。また、本発明の一実施形態に係るコントロール装置は、ハードウェアリソースを共有可能な拡張装置の情報を取得し、コントロール装置及び共有された拡張装置に制御プログラムまたは情報プログラムを配置してよい。拡張装置は、必ずしもコントロール装置のハードウェアリソースを共有可能でなくてもよい。例えば、コントロール装置が接続されているバスに接続された拡張装置は、コントロール装置のハードウェアリソースを共有可能でよく、コントロール装置が接続されている通信ネットワークに接続された拡張装置は、コントロール装置のハードウェアリソースを共有可能でなくてよい。コントロール装置も拡張装置も演算装置の一例である。
 以下の説明では、「インターフェース装置」は、一つ以上のインターフェースデバイスでよい。当該一つ以上のインターフェースデバイスは、一つ以上の同種の通信インターフェースデバイスであってもよいし二つ以上の異種の通信インターフェースデバイスであってもよい。
 また、以下の説明では、「メモリ」は、一つ以上のメモリデバイスであり、典型的には主記憶デバイスでよい。メモリにおける少なくとも一つのメモリデバイスは、揮発性メモリデバイスであってもよいし不揮発性メモリデバイスであってもよい。
 また、以下の説明では、「永続記憶装置」は、一つ以上の永続記憶デバイスである。永続記憶デバイスは、典型的には、不揮発性の記憶デバイス(例えば補助記憶デバイス)であり、具体的には、例えば、HDD(Hard Disk Drive)又はSSD(Solid State Drive)である。
 また、以下の説明では、「記憶装置」は、メモリと永続記憶装置の少なくともメモリでよい。
 また、以下の説明では、「プロセッサ」は、一つ以上のプロセッサデバイスでよい。少なくとも一つのプロセッサデバイスは、典型的には、CPU(Central Processing Unit)のようなマイクロプロセッサデバイスでよいが、GPU(Graphics Processing Unit)のような他種のプロセッサデバイスでもよい。少なくとも一つのプロセッサデバイスは、シングルコアでもよいしマルチコアでもよい。少なくとも一つのプロセッサデバイスは、プロセッサコアでもよい。少なくとも一つのプロセッサデバイスは、処理の一部又は全部を行うハードウェア回路(例えばFPGA(Field-Programmable Gate Array)、CPLD(Complex Programmable Logic Device)又は又はASIC(Application Specific Integrated Circuit))といった広義のプロセッサデバイスでもよい。
 また、以下の説明では、「プログラム」を主語として処理を説明する場合があるが、プログラムは、プロセッサによって実行されることで、定められた処理を、適宜に記憶装置及び/又はインターフェース装置等を用いながら行うため、処理の主語が、プロセッサ(或いは、そのプロセッサを有するコントローラのようなデバイス)とされてもよい。プログラムは、プログラムソースから計算機のような装置にインストールされてもよい。プログラムソースは、例えば、プログラム配布サーバ又は計算機が読み取り可能な(例えば非一時的な)記録媒体であってもよい。また、以下の説明において、二つ以上のプログラムが一つのプログラムとして実現されてもよいし、一つのプログラムが二つ以上のプログラムとして実現されてもよい。
 また、以下の説明では、「yyy部」の表現にて機能を説明することがあるが、機能は、一つ以上のコンピュータプログラムがプロセッサによって実行されることで実現されてよい。プログラムがプロセッサによって実行されることで機能が実現される場合、定められた処理が、適宜に記憶装置及び/又はインターフェース装置等を用いながら行われるため、機能はプロセッサの少なくとも一部とされてもよい。機能を主語として説明された処理は、プロセッサあるいはそのプロセッサを有する装置が行う処理としてもよい。各機能の説明は一例であり、複数の機能が一つの機能にまとめられたり、一つの機能が複数の機能に分割されたりしてもよい。
 また、以下の説明では、「xxxテーブル」といった表現にて、入力に対して出力が得られる情報を説明することがあるが、当該情報は、どのような構造のデータでもよいし(例えば、構造化データでもよいし非構造化データでもよいし)、入力に対する出力を発生するニューラルネットワーク、遺伝的アルゴリズムやランダムフォレストに代表されるような学習モデルでもよい。従って、「xxxテーブル」を「xxx情報」と言うことができる。また、以下の説明において、各テーブルの構成は一例であり、一つのテーブルは、二つ以上のテーブルに分割されてもよいし、二つ以上のテーブルの全部又は一部が一つのテーブルであってもよい。
 また、以下の説明では、識別情報の一例として、ID、名前及び番号のいずれかが採用されるが、識別情報は、ID、名前及び番号のうちの少なくとも一つに代えて又は加えて、他種の要素を含んでもよい。
 また、以下の説明では、同種の要素を区別しないで説明する場合には、参照符号のうちの共通部分を使用し、同種の要素を区別して説明する場合には、参照符号を使用することがある。
 また、以下の説明では、制御プログラムの一例が、制御アプリであり、情報プログラムの一例が、情報アプリである。「アプリ」は、アプリケーションプログラムの略である。
[第1の実施形態]
 図1は、第1の実施形態に係るコントロールシステムを含むシステムの物理構成の一例を示す。
 コントロールシステム109が、制御対象装置12がある工場10に設置される。制御対象装置12は、例えば、産業用モータやコンプレッサのような産業機器である。工場10は、制御対象装置12のある現場の一例である。
 管理システム101及びコントロールシステム109が、通信ネットワーク108(例えば、インターネット又はWAN(Wide Area Network))に接続されている。コントロールシステム109は、例えば、工場10内の通信ネットワーク19(例えば、LAN(Local Area Network))に接続されている。コントロールシステム109が、通信ネットワーク19及び108経由で管理システム101と通信できる。通信ネットワーク108及び19は、情報アプリが行う情報通信処理(制御アプリがスキャン処理において制御対象装置12に制御データを送信する処理とは異なる通信処理)の際に使用される通信ネットワークである。
 コントロールシステム109及び一つ以上のI/Oモジュール119(I/Oポートの一例)が通信ネットワーク118(例えば、イーサネット(登録商標))に接続されている。通信ネットワーク118は、制御アプリが行う制御処理において制御データを制御対象装置12に送信するために使用される通信ネットワークである。
 通信ネットワーク19、108及び118は、それぞれ異なるネットワークでもよいし、通信ネットワーク19、108及び118のうちの二つ以上の通信ネットワークが同一のネットワークでもよい。
 一つ以上のI/Oモジュール119に一つ以上の周辺機器120が接続されている。周辺機器120は、センサやメディアドライブ(例えば、HDDやSSD)のような機器でよい。I/Oモジュール119は、周辺機器120が必要に応じて着脱可能に装着されるバススロットとして機能する。制御対象装置12は、周辺機器120経由又は非経由でI/Oモジュール119に接続される。制御対象装置12とI/Oモジュール119は、1:1、1:多、多:1及び多:多のいずれでもよい。また、一部のI/Oモジュール119は、通信ネットワーク118に加えて通信ネットワーク108に接続されてもよい、すなわち、当該一部のI/Oモジュール119は、制御アプリと情報アプリに共有のデバイスであってもよい。また、少なくとも一つのI/Oモジュール119は、少なくとも一つの演算装置40のネットワークI/F装置及びI/O制御装置の少なくとも一部でもよい。
 管理システム101は、コントロールシステム109の上位システムの一例である。管理システム101は、EPROM201、CPU202、メインメモリ203、周辺制御装置205、不揮発性記憶装置206及びネットワークI/F装置207を備える。管理システム101は、ネットワークI/F装置207を介して通信ネットワーク108に接続されている。
 コントロールシステム109は、一つ又は複数の演算装置40を備える。各演算装置40が、インターフェース装置、記憶装置及びそれらに接続されたプロセッサを備える。全ての演算装置40は、ハードウェア構成が同じでも異なっていてもよい。いずれの演算装置40も、制御アプリの配置先にも情報アプリの配置先にもなり得てよい。本実施形態では、演算装置40Mは、メインの演算装置であり、制御アプリの配置先であり、且つ、情報アプリの配置先となり得る演算装置である。演算装置40E1及び40E2の各々が、増設された演算装置であり、制御アプリの配置先となり得ず、情報アプリの配置先となり得る演算装置である。演算装置40Eは、減設されてもよい。言い換えれば、演算装置40M単体が、コントロールシステム109になることがあってもよい。以下、演算装置40Mを「コントロール装置40M」と言い、演算装置40Eを「拡張装置40E」と言うことがある。
 拡張装置40Eが有るか否か、拡張装置40Eがいずれの種類の通信媒体に接続されるか、及び、制御アプリと通信する情報アプリがいずれの演算装置40に配置されるかによって、コントロールシステム109のシステム構成が異なる。つまり、システム構成は、拡張装置40Eの有無、コントロール装置40M及び拡張装置40Eの各々が接続される通信媒体の種類、及び、各アプリの配置先の演算装置40に依存する。図1の例では、拡張装置40E1は、通信ネットワーク118に接続される。拡張装置40E2は、PIOバス28(バスの一例)に接続される(「PIO」は、Programmed I/Oの略である)。PIOバス28は、ベースボードにプリントされたバスでよく、ベースボードにコントロール装置40Mと拡張装置40E2が接続されていることで、コントロール装置40Mで実行される制御アプリと拡張装置40E2で実行される情報アプリがPIOバス28経由でデータを通信(共有)してよい。
 なお、制御アプリが拡張装置40Eにも配置可能な実施形態、或いは、いずれの演算装置40も拡張又は減設が可能でありいずれの演算装置40も制御アプリの配置先となり得る実施形態では、システム構成は、制御アプリにも依存する。
 コントロール装置40Mを例に取り演算装置40のハードウェア構成を説明すると、例えば次の通りである。すなわち、コントロール装置40Mは、メモリ169(例えば、EPROM208及びメインメモリ210)、周辺制御装置212、I/O制御装置214、不揮発性記憶装置215、ネットワークI/F装置213、及び、それらに接続されたCPU209を備えている。I/O制御装置214及びネットワークI/F装置213が、インターフェース装置の一例である。メモリ169及び不揮発性記憶装置215が、記憶装置の一例である。CPU209がプロセッサの一例である。
 周辺制御装置212は、ネットワークI/F装置213、I/O制御装置214、不揮発性記憶装置215及びバス211に接続されている。このバス211には、その他にもメモリ169及びCPU209が接続されている。
 EPROM208には、予め制御アプリ及び情報アプリの少なくとも一つが格納されていてもよいし、プログラム配布サーバ(図示せず)のようなプログラムソースからダウンロードされたプログラムが格納されてもよい。コントロールシステム109に搭載される制御アプリと情報アプリはそれぞれひとつずつだけでなく、コントロールシステム109が使用できるリソースをプログラムごとに設定することにより、複数の制御アプリ及び/又は複数の情報アプリを搭載することができる。
 CPU209は、EPROM208に格納されている制御アプリ(及び情報アプリ)をメインメモリ210に読み出して実行し、制御アプリ(及び情報アプリ)の動作を制御する。例えば、CPU209は、制御アプリを実行することで、周辺制御装置212、I/O制御装置214及び複数のI/Oモジュール119を介して複数の周辺機器120を制御する。周辺機器120は、I/Oモジュール119に1:1で対応付けられていてよい。また、CPU209は、シングルコアとマルチコアのいずれでもよい。一つのコアが、一つ以上の制御アプリと一つ以上の情報アプリとのうちの少なくとも一つのアプリを実行してよい。典型的には、一つのコアは、一つの制御アプリ、一つの制御アプリと一つ以上の情報アプリ、又は、一つ以上の情報アプリを実行してよい。
 設定端末29が、通信ネットワーク19を介して(又は通信ネットワーク19を介さずに)、コントロールシステム109(例えば、コントロール装置40M)に接続されている。設定端末29は、例えば、入力デバイス、表示デバイス、インターフェース装置、記憶装置及びそれらに接続されたプロセッサを有する計算機(例えば、デスクトップ型、ラップトップ型又はタブレット型のパーソナルコンピュータ、或いは、スマートフォン)である。設定端末29は、コントロールシステム109に対する指示や設定を行ってよい。設定端末29は、管理システム101の一部であってもよい。
 図2は、コントロールシステム109の論理構成の一例を示す。
 図2が例示するコントロールシステム109は、複数の演算装置40の一例として、コントロール装置40Mと、拡張装置40E1及び40E2とを有する。
 コントロール装置40Mは、共有メモリ56を有する。共有メモリ56は、メモリ169が有する記憶領域のうちの少なくとも一部である。図示しないが、拡張装置40E1及び40E2の少なくとも一つにおいても、共有メモリが存在してよい。
 拡張装置40E1は、コントロール装置40Mが接続されているバックボード17に接続されている演算装置である。コントロール装置40Mと拡張装置40E1間の通信媒体は、バックボード17に設けられているPIOバス28である。
 拡張装置40E2は、コントロール装置40Mが接続されている通信ネットワーク118に接続されている演算装置である。コントロール装置40Mと拡張装置40E2間の通信媒体は、通信ネットワーク118である。
 このように、本実施形態では、コントロールシステム109は、アプリ間のデータ共有に共有メモリ56、PIOバス28及び通信ネットワーク118といった複数種類の通信媒体を利用することができる。
 PIOバス28を介した通信を行う演算装置40は、PIOバス制御61というPIOバス28用のI/Fを有する。PIOバス制御61は、図3に例示するように、バスI/F301、バスドライバ302及びバスHW303を含む。バスI/F301は、PIOバス28に対するソフトウェアI/Fである。バスドライバ302は、PIOバス28経由のデータ共有(通信)を制御するソフトウェアである。バスHW303は、PIOバス28経由のデータ共有(通信)を制御するハードウェア(例えば、FPGA(Field-Programmable Gate Array)又はASIC(Application Specific Integrated Circuit))である。バスHW303は、例えばI/O制御装置214(図1参照)の少なくとも一部でよい。
 通信ネットワーク(例えば通信ネットワーク118)を介した通信を行う演算装置40は、ネットワーク制御62という通信ネットワーク用のI/Fを有する。ネットワーク制御62は、図4に例示するように、ネットワークI/F401、ネットワークドライバ402及びネットワークHW403を含む。ネットワークI/F401は、通信ネットワークに対するソフトウェアI/Fである。通信ネットワークの種類毎にネットワークドライバ402及びネットワークHW403が存在する。一つの種類の通信ネットワーク(この段落において「対象ネットワーク」)を例に取る。ネットワークドライバ402は、対象ネットワーク経由のデータ共有(通信)を制御するソフトウェアである。ネットワークHW403は、対象ネットワーク経由のデータ共有(通信)を制御するハードウェアである。ネットワークHW403は、例えばネットワークI/F装置213(図1参照)の少なくとも一部でよい。
 コントロール装置40Mが、WEBサーバ69を実行する。WEBサーバ69は、WEBサーバとして機能するためのプログラムである。WEBサーバ69が、管理システム101及び設定端末29のうちの少なくとも一つと通信する。例えば、WEBサーバ69が、設定端末29から種々の指示や設定を受け付けるユーザインターフェースプログラムの一例である。WEBサーバ69は、コントロール装置40Mに代えて又は加えて、少なくとも一つの拡張装置40Eで実行されてもよい。
 管理システム101の不揮発性記憶装置206(記憶装置の一例)が、VCPU管理情報73を記憶する。VCPU管理情報73は、例えば、VCPU毎にVCPUイメージとVCPUのIDとを含む。「VCPU」は、仮想CPUを意味し、アプリの実行環境の一例である。VCPUは、例えば、VM(仮想マシン)又はコンテナでよい。
 管理システム101が、配布部72を有する。配布部72は、VCPUイメージを通信ネットワーク108経由で演算装置40に配布する。演算装置40では、当該VCPUイメージを基に、VCPU37が生成される。VCPU37が、一つ以上のアプリ(本実施形態では、制御アプリ41及び情報アプリ42のいずれか)を実行する。VCPU37が実現された後に、当該VCPU37にアプリが配布部72により配布されてもよいし、VCPUイメージが、アプリのイメージを含んでいて、VCPUイメージを基に、アプリを含んだVCPUが実現されてもよい。図2が示す例では、コントロール装置40MにVCPU37A及び37Bが配布され、拡張装置40E1にVCPU37Cが配布され、拡張装置40E2にVCPU37Dが配布される。VCPU37Aが、制御アプリ41を実行する。VCPU37Bが、情報アプリ42Aを実行する。VCPU37Cが、情報アプリ42Bを実行する。VCPU37Dが、情報アプリ42Cを実行する。
 情報アプリ42は、当該情報アプリ42に定められた情報処理を行うアプリである。
 制御アプリ41は、当該制御アプリ41について定められた制御周期毎に、制御対象装置12を制御する処理でありリアルタイム性を有する処理であるスキャン処理(I/Oポートに接続された機器の情報を読み込むことと、読み込んだ情報を演算することと、演算した情報を書き込むこととを含んだ処理)を行う。スキャン処理に要する時間を「スキャンタイム」と言う。制御周期は、スキャンタイムと、スキャンタイム以外の時間である待機時間とで構成される。例えば、コントロールシステム109が、コントロール装置40M単体であり、コントロール装置40Mに制御アプリ41と一つ以上の情報アプリ42があり、且つ、CPU209がシングルコアの場合には、制御周期中の待機時間に、一つ以上の情報アプリ42の少なくとも一つが実行される。一方、例えば下記のうちのいずれかのケースでは、スキャンタイム中に(言い換えれば、待機時間でなくても)、少なくとも一つの情報アプリ42が実行されてよい。
・CPU209がマルチコアであり、CPU209が、制御アプリ41が専有していないCPUコアを有する場合。
・コントロール装置40Mが、複数のCPU209を有し、それら複数のCPU209が、制御アプリ41に専有されていないCPU209を含む場合。
・拡張装置40Eがあり、拡張装置40Eに情報アプリ42が配置されている場合。
 さて、VCPU37にてアプリを実行することで、一つの演算装置40(図2が示す例では、コントロール装置40M)にて、制御の信頼性を落とさずに、制御アプリ41と情報アプリ42の両方を実行することができる。
 しかし、VCPU37にてアプリが実行されるシステムでは、アプリ間のデータ共有が難しい。アプリ間で、お互いのVCPU37の計算リソースを認識することができないためである。
 一比較例によれば、異なるVCPU上のアプリ間でのデータ共有を実現するためには、制御アプリと情報アプリのいずれについても、アプリ開発者が、当該アプリがいずれの種類の通信媒体経由でデータ共有を行うかを予め決定し、当該通信媒体の種類に従う情報でありデータ共有に必要な情報を、アプリに設定する必要がある。アプリに設定される情報を、便宜上、「設定情報」と言う。一比較例において、設定情報の具体例は、次の通りである。すなわち、通信媒体の種類が共有メモリの場合、設定情報は、共有メモリの名前を表す情報と、共有データ(共有対象のデータ)のデータ項目の名前を表す情報とを含む。通信媒体の種類がバスの場合、設定情報は、バス番号(例えば、レジスタアドレス)を表す情報と、共有データのデータ項目の名前を表す情報とを含む。通信媒体の種類が通信ネットワークの場合、設定情報は、宛先(例えば、IPアドレス及びポート番号)を表す情報と、プロトコル種類(例えば、HTTP、Modbus/TCP)を表す情報と、共有データのデータ項目の名前を表す情報とを含む。
 このように、一比較例では、アプリの設定情報が、当該アプリがいずれの種類の通信媒体経由でデータ共有を行うかに依存するため、アプリ開発が煩雑である。
 また、一比較例では、アプリの配置先は、当該アプリが設定情報に対応した種類の通信媒体経由で通信できる演算装置でなければならない。つまり、アプリの配置先が、当該アプリの設定情報に依存するため、アプリの配置先の自由度が低い。
 そこで、本実施形態では、通信媒体が共有メモリ56、PIOバス28及び通信ネットワーク118のいずれであってもデータ共有を実現する共有I/F(共有インターフェース)が設けられる。当該共有I/Fは、OSが一般に提供する共有メモリ用のI/Fよりも上のレイヤのI/Fである。共有I/Fは、アプリからI/O指定(例えば、関数呼出し)を受け付けるが、当該I/O指定において、宛先アプリの名前と共有データのデータ項目の名前とがそれぞれ引数とされていれば、当該アプリと当該宛先アプリとの間の通信媒体の種類に関わらずデータ共有が実現される。言い換えれば、共有I/Fは、いずれの種類の通信媒体経由でデータ共有するかをアプリに意識させない。このため、アプリ開発においてアプリに設定する情報は、アプリ間の通信媒体の種類に依存しない。故に、アプリ開発の煩雑さが低減される。
 また、本実施形態では、各演算装置40に共有I/Fが存在する。共有I/Fの存在により、通信媒体の種類をアプリが意識する必要の無いデータ共有が可能である。このため、アプリの配置先は、当該アプリの設定情報に依存しない。故に、アプリの配置先の自由度が高い。
 以上のように、本実施形態によれば、共有メモリ56の他に通信ネットワーク118とPIOバス28の少なくとも一つをアプリ間のデータ共有に利用することが可能なコントロールシステム109のシステム構成変更(例えば、演算装置40の増設又は減設に伴いアプリの配置先の演算装置40を変更すること、及び、演算装置40の接続先の通信媒体の種類を変更することの少なくとも一つ)を、制御のリアルタイム性を維持しつつ柔軟に行うことができる。
 以下、本実施形態を詳細に説明する。なお、アプリ間のデータ共有は、制御アプリ41間で行われても情報アプリ42間で行われてもよいが、本実施形態は、一つの制御アプリ41が一つ又は複数の情報アプリ42とデータを共有するケースを例に取る。また、本実施形態において、少なくともコントロール装置40MのOS(Operating System)は、リアルタイム汎用OS(情報処理向けの汎用OSの系統ではあるものの必要とされるリアルタイム性を提供できるリアルタイム機能を持ったOS)でよく、制御アプリ41や情報アプリ42の実行タイミングは、リアルタイム汎用OSにより制御されてよい。或いは、制御アプリ41や情報アプリ42の実行タイミングは、ランタイムソフトウェアにより制御されてよい。
 共有I/Fは、制御アプリ41と情報アプリ42に共通でもよいが、本実施形態では、制御アプリ41用の共有I/Fである制御共有I/F36と、情報アプリ42用の共有I/Fである情報共有I/F37とがある。つまり、制御アプリ41と情報アプリ42とで利用される共有I/Fが異なる。これにより、制御アプリ41に利用される共有I/F36の構成を、制御のリアルタイム性を考慮した構成とすることができ、以って、制御のリアルタイム性の維持に貢献することができる。
 また、例えば、コントロール装置40Mに複数の制御アプリ41が存在する場合、制御共有I/F36は、複数の制御アプリ41に共通でもよいが、制御アプリ41毎に、制御アプリI/F36が存在してよい。同様に、例えば、コントロール装置40M又は拡張装置40Eに複数の情報アプリ42が存在する場合、情報共有I/F37は、複数の情報アプリ42に共通でもよいが、情報アプリ42毎に、情報共有I/F37が存在してよい。図2が示す例によれば、制御アプリ41と情報アプリ42Aがコントロール装置40Mに存在するため、制御アプリ41に利用される制御共有I/F36と情報アプリ42Aに利用される情報共有I/F37Aとがコントロール装置40Mに存在する。情報アプリ42Bが拡張装置40E1に存在するため、情報アプリ42Bに利用される情報共有I/F37Bが拡張装置40E1に存在する。情報アプリ42Cが拡張装置40E2に存在するため、情報アプリ42Cに利用される情報共有I/F37Cが拡張装置40E2に存在する。
 コントロール装置40M及び各拡張装置40Eに、マッピングテーブル群80が存在する。マッピングテーブル群80は、データ共有のために共有I/Fに参照されるテーブル群である(「テーブル群」は、一つ又は複数のテーブルである)。マッピングテーブル群80は、アプリ用のマッピングテーブル群であるアプリマッピングテーブル群81と、データ用のマッピングテーブル群であるデータマッピングテーブル群82とを含む。図2が示す例によれば、マッピングテーブル群80Xは、アプリマッピングテーブル群81Xと、データマッピングテーブル群82Xとを含み、コントロール装置40Mに存在する。マッピングテーブル群80Yは、アプリマッピングテーブル群81Yと、データマッピングテーブル群82Yとを含み、拡張装置40E1に存在する。マッピングテーブル群80Zは、アプリマッピングテーブル群81Zと、データマッピングテーブル群82Zとを含み、拡張装置40E2に存在する。
 制御アプリ41は、制御アプリ41の設定情報を基に、制御共有I/F36に対してI/O指定を行う。当該I/O指定に応答して、制御共有I/F36が、マッピングテーブル群80Xを参照し、下記のいずれかを行う。
・共有メモリ56を介して情報アプリ42Aとの間で変数値のデータ共有を行うために、共有メモリ56に対して、当該変数値のI/Oを行う。
・PIOバス28を介して情報アプリ42Bとの間で変数値のデータ共有を行うために、PIOバス制御61Aに対して、当該変数値のI/Oを行う。
・通信ネットワーク118を介して情報アプリ42Cとの間で変数値のデータ共有を行うために、ネットワーク制御62Aに対して、当該変数値のI/Oを行う。
 情報アプリ42Aは、情報アプリ42Aの設定情報を基に、情報共有I/F37Aに対してI/O指定を行う。当該I/O指定に応答して、情報共有I/F37Aが、マッピングテーブル群80Xを参照し、共有メモリ56を介して制御アプリ41との間で変数値のデータ共有を行うために、共有メモリ56に対して、当該変数値のI/Oを行う。
 情報アプリ42Bは、情報アプリ42Bの設定情報を基に、情報共有I/F37Bに対してI/O指定を行う。当該I/O指定に応答して、情報共有I/F37Bが、マッピングテーブル群80Yを参照し、PIOバス28を介して制御アプリ41との間で変数値のデータ共有を行うために、PIOバス制御61Bに対して、当該変数値のI/Oを行う。
 情報アプリ42Cは、情報アプリ42Cの設定情報を基に、情報共有I/F37Cに対してI/O指定を行う。当該I/O指定に応答して、情報共有I/F37Cが、マッピングテーブル群80Zを参照し、通信ネットワーク118を介して制御アプリ41との間で変数値のデータ共有を行うために、ネットワーク制御62Bに対して、当該変数値のI/Oを行う。
 以下、制御アプリ41の設定情報を、「第1の設定情報」と言い、情報アプリ42の設定情報を、「第2の設定情報」と言う。また、本実施形態では、共有データは、変数値(変数の値)であり、共有データのデータ項目の名前は、変数名(変数の名前)であるとする。
 第1の設定情報及び第2の設定情報のいずれも、通信媒体の種類に依存しない情報である。
 図5に例示の通り、制御アプリ41の第1の設定情報500は、制御アプリ41の共有対象の変数毎に、変数名501、宛先アプリ名502及びアクセス権503といった情報を含む。一つの変数を例に取る(図5の説明において「対象変数」)。変数名501は、対象変数の名前を表す情報である。宛先アプリ名502は、対象変数の変数値を共有する相手のアプリの名前を表す(“ALL”は、制御アプリ41以外の全てのアプリ(本実施形態では全ての情報アプリ42)を意味する)。アクセス権503は、対象変数の変数値の書き込みを行うアプリの名前と、対象変数の変数値の読み出しを行うアプリの名前とを表す(“ALL”は、制御アプリ41以外の全てのアプリを意味する)。図5が示す例によれば、変数1の変数値は、全ての情報アプリ42との間で共有され、制御アプリ41によって書かれ、全ての情報アプリ42によって読まれる。
 図6に例示の通り、情報アプリ42の第2の設定情報600は、情報アプリ42の共有対象の変数毎に、変数名601、宛先アプリ名602及びアクセス権603といった情報を含む。一つの変数を例に取る(図6の説明において「対象変数」)。変数名601は、対象変数の名前を表す情報である。宛先アプリ名602は、対象変数の変数値を共有する相手のアプリの名前を表す。アクセス権603は、対象変数の変数値の書き込みを行うアプリの名前と、対象変数の変数値の読み出しを行うアプリの名前とを表す。図6が示す例によれば、変数1の変数値は、制御アプリ41との間で共有され、制御アプリ41によって書かれ、当該情報アプリ42によって読まれる。
 図7は、制御共有I/F36の構成を示す。
 制御共有I/F36は、制御I/F部701と、制御共有部702とを有する。制御I/F部701は、制御アプリ41からのI/O指定を受け付ける。制御共有部702は、I/O指定に応答して、マッピングテーブル群80を参照し、変数値のI/O(読み出し又は書き込み)を行う。制御共有部702は、例えば、複数の関数を含んだライブラリを有する。各関数は、読み出し又は書き込みを行うための関数である。
 図8は、情報共有I/F37の構成を示す。
 情報共有I/F37は、情報I/F部801と、情報共有部802とを有する。情報I/F部801は、情報アプリ42からのI/O指定を受け付ける。情報共有部802は、I/O指定に応答して、マッピングテーブル群80を参照し、変数値のI/Oを行う。情報共有部802は、例えば、複数の関数を含んだライブラリを有する。各関数は、読み出し又は書き込みを行うための関数である。
 少なくとも一つの共有I/Fの少なくとも一部が、少なくとも一つのアプリに含まれてもよい。例えば、制御共有I/F36の少なくとも一部が制御アプリ41に含まれてもよい。また、例えば、情報共有I/F37の少なくとも一部が情報アプリ42に含まれてもよい。
 マッピングテーブル群80は、上述したように、アプリマッピングテーブル群81及びデータマッピングテーブル群82を含む。アプリマッピングテーブル群81は、アプリテーブル900(図9参照)、ネットワークマッピングテーブル1000(図10参照)、バスマッピングテーブル1100(図11参照)、及び、メモリマッピングテーブル1200(図12参照)を含む。データマッピングテーブル群82は、データマッピングテーブル1300(図13参照)を含む。マッピングテーブル群80の少なくとも一部がアプリに含まれてもよい。以下、各テーブルを説明する。
 図9は、アプリテーブル900の構成を示す。
 アプリテーブル900は、コントロールシステム109に存在するアプリ毎に、アプリ名901及び通信媒体種類902といった情報を保持する。一つのアプリを例に取る(図9の説明において「対象アプリ」)。
 アプリ名901は、対象アプリの名前を表す。通信媒体種類902は、対象アプリがデータ共有のために利用する通信媒体の種類を表す(“ALL”は、全ての種類の通信媒体を利用することを意味する)。
 アプリ間の通信媒体の種類が変更されるシステム構成変更(例えば、演算装置40の増設又は減設に伴いアプリの配置先の演算装置40を変更すること、及び、演算装置40の接続先の通信媒体の種類を変更することの少なくとも一つ)がされた場合、アプリテーブル900(アプリ名901及び通信媒体種類902の対応関係)は更新される。アプリテーブル900の更新は、例えば、管理システム101によって行われてよい。
 本実施形態では、一つの制御アプリ41が複数の情報アプリ42とデータ共有する例が採用されているため、アプリ名901“0000”のアプリが制御アプリ41であり、それ以外のアプリが情報アプリ42である。複数の制御アプリ41が存在したり、情報アプリ42間でデータ共有が行われたりする例では、少なくとも一つのアプリについての通信媒体種類902の値は、複数の通信媒体種類を表す値であり得る。
 図10は、ネットワークマッピングテーブル1000の構成を示す。
 ネットワークマッピングテーブル1000は、通信媒体種類902が“ALL”又は“ネットワーク”であるアプリ毎に、アプリ名1001と、通信ネットワーク118経由でのデータ共有に必要な情報、例えば、プロトコル種類1002、IPアドレス1003、ポート番号1004及びデータパス1005といった情報を保持する。一つのアプリを例に取る(図10の説明において「対象アプリ」)。
 アプリ名1001は、対象アプリの名前を表す。プロトコル種類1002は、対象アプリとのデータ共有(通信)で使用される通信プロトコル種類を表す。IPアドレス1003は、対象アプリとのデータ共有(通信)で使用されるIPアドレスを表す。ポート番号1004は、対象アプリとのデータ共有(通信)で使用されるポートの番号を表す。データパス1005は、対象アプリとのデータ共有(通信)で使用されるデータパスを表す。対象アプリとのデータ共有のために共有I/Fからネットワーク制御62に対して行われるI/Oでは、対象アプリに対応した情報1002~1005が使用される。
 図11は、バスマッピングテーブル1100の構成を示す。
 バスマッピングテーブル1100は、通信媒体種類902が“ALL”又は“バス”であるアプリ毎に、アプリ名1101と、PIOバス28経由でのデータ共有に必要な情報、例えば、バス番号1102といった情報を保持する。一つのアプリを例に取る(図11の説明において「対象アプリ」)。
 アプリ名1101は、対象アプリの名前を表す。バス番号1102は、対象アプリとのデータ共有(通信)で使用されるバス番号を表す。対象アプリとのデータ共有のために共有I/FからPIOバス制御61に対して行われるI/Oでは、対象アプリに対応したバス番号1102が使用される。
 図12は、メモリマッピングテーブル1200の構成を示す。
 メモリマッピングテーブル1200は、通信媒体種類902が“ALL”又は“共有メモリ”であるアプリ毎に、アプリ名1201と、共有メモリ56経由でのデータ共有に必要な情報、例えば、共有メモリ名1202といった情報を保持する。一つのアプリを例に取る(図12の説明において「対象アプリ」)。
 アプリ名1201は、対象アプリの名前を表す。共有メモリ名1202は、対象アプリとのデータ共有(通信)で使用され共有メモリ56の名前を表す。対象アプリとのデータ共有のために共有I/Fから共有メモリ56に対して行われるI/Oでは、対象アプリに対応した共有メモリ名1202が使用される。
 図13は、データマッピングテーブル1300の構成を示す。
 データマッピングテーブル1300は、変数毎に、変数名1301及び位置1302といった情報を保持する。一つの変数を例に取る(図13の説明において「対象変数」)。
 変数名1301は、変数の名前を表す。位置1302は、変数値の位置を表す。例えば、共有メモリ56経由でデータ共有される変数値については、位置1302は、共有メモリ56の先頭からの位置と、データ長とを表す。
 以下、図14~図18を参照して、本実施形態で行われる処理の例を説明する。
 図14が示すように、システム構成情報1420が存在する。システム構成情報1420は、コントロールシステム109の構成を表す情報である。システム構成情報1420は、例えば、管理者により入力された情報を含んでもよいし、コントロール装置40M(例えば、制御アプリ41又は他のプログラム)により当該コントロール装置40M及び各演算装置40Eから収集された情報(例えば、アプリ名を含んだ情報)を含んでもよい。システム構成情報1420は、コントロール装置40M、設定端末29及び管理システム101のうちの少なくとも一つに格納されてよい。システム構成情報1420は、例えば、コントロールシステム109に存在する又は配布可能なアプリのアプリ名の一覧と、各アプリの属性(制御アプリと情報アプリのいずれであるか)と、演算装置40毎のアドレスとを表す情報を含んでよい。
 展開部1410が存在する。展開部1410は、例えば、コントロール装置40Mに存在し、WEBサーバ69を含んでもよい。或いは、展開部1410は、管理システム101又は設定端末29に存在してもよい。
 展開部1410は、設定GUI(Graphical User Interface)1400を表示する。設定GUI1400は、例えば設定端末29に表示される。設定GUI1400は、第1の設定情報を設定するためのGUI(ユーザインターフェースの一例)であり、例えば、制御アプリ41のアプリ開発者向けのGUIである。設定GUI1400は、入力テーブル1450と設定ボタン1401とを有する。入力テーブル1450は、変数毎に、共有対象とするか否かのチェックボックス1421と、変数名の入力欄1422と、宛先アプリ名の入力欄1423と、アクセス権の入力欄1424とを有する。展開部1410は、設定GUI1400上に(又は別のユーザインターフェース上に)、システム構成情報1420を基に、コントロールシステム109に存在する又は配布可能な情報アプリ42のアプリ名の一覧を表示してもよい。また、システム構成情報1420は、マッピングテーブル群80に含まれる情報の一部を含んでもよい。
 汎用コンピュータ分野では、複数のアプリによる変数値の書き込みが競合した場合、競合回避のために一つのアプリによる書き込みが終わることを待つことが行われる。しかし、本実施形態に係るコントロールシステム109において、スキャン処理中又はスキャン処理後の変数値書き込みに待ちが生じると、その待ちの間に次のスキャン処理の開始タイミングが到来するおそれがある。このため、汎用コンピュータ分野の競合回避技術を単純にコントロールシステム109に適用することができない。
 制御アプリ41のスキャン処理は情報アプリ42の情報処理に比べて高速である。このため、データ共有の対象でありI/Oポートに接続された産業機器に関する変数値が、繰り返し更新される。故に、情報アプリ42に対してそのような変数値を書き込みできる権限を与えないことが望ましい。
 言い換えると、情報アプリ42の情報処理(例えば、データ更新処理)の周期よりも制御アプリ41のスキャン処理の周期の方が短いため、情報アプリのアクセス権としてはリードオンリーであることが望ましい。
 また、情報アプリ42は、I/Oポートに関する変数値についてリードオンリーで読み出し、当該変数値を用いた計算の結果を、別途設定した変数の変数値として書き込むことができる。情報アプリ42が複数ある場合には、所定の変数値について、書き込みできる情報アプリ42は一つに限定されてよい。例として、制御アプリ41と三つの情報アプリ42が配置されたコントロールシステム109において、或る変数の変数値の書き込み権限は、制御アプリ41のみ、又は、三つの情報アプリ42のうちのいずれかのみに与えられてよい。
 以上のように、本実施形態では、各変数について、変数値を書き込むアプリは一つである。これにより、各変数について、二つ以上のアプリが同時に変数値を書き込むといった競合や、或るアプリが変数値を書き込んでいるため別のアプリが変数値の書き込みを待つといった書込み待ちが生じない。このため、変数値を書き込むアプリが一つであることは、制御アプリ41の制御のリアルタイム性を維持することに貢献する。
 さて、展開部1410は、入力テーブル1450に入力された内容に従う設定の指示を受け付けた場合(図14が示す例では、設定ボタン1401が押された場合)、下記(A)~(C)のうちの少なくとも一つを行ってよい。なお、下記の処理において、必要に応じて、システム構成情報1420が展開部1410により参照される。
(A)展開部1410は、入力テーブル1450に入力された内容に従う第1の設定情報500を生成し、第1の設定情報500が設定された制御アプリ41を、コントロール装置40Mに配布する(例えば、コントロール装置40Mの空きのVCPU37に、制御アプリ41を展開する)。第1の設定情報500は、共有対象とされた変数毎に、変数名、宛先アプリ名及びアクセス権を含む。
(B)展開部1410は、入力テーブル1450に入力された内容に従う第2の設定情報600を生成し、第2の設定情報600を、制御アプリ41とデータ共有を行う情報アプリ42(共有対象とされる少なくとも一つの変数について、宛先アプリ名が表す情報アプリ42)に設定する。例えば、変数名“変数2”について、情報アプリ42A(アプリ名“0001”)に対する第2の設定情報600は、変数名“変数2”と、宛先アプリ名“0000”(制御アプリ41のアプリ名)と、アクセス権“WRITE:0000”及び“READ:0001”とを含む。すなわち、制御アプリ41の宛先アプリ名として設定されたアプリ名を持つ情報アプリ42に対する第2の設定情報600は、宛先アプリ名として、制御アプリのアプリ名を含み、アクセス権として、制御アプリ41について設定されたアクセス権と同じアクセス権を含む。
(C)展開部1410は、入力テーブル1450に入力された内容に従うマッピングテーブル群80のうちの少なくともデータマッピングテーブル群82を生成し、マッピングテーブル群80を、各演算装置40に配布する。マッピングテーブル群80中のアプリマッピングテーブル群81は、例えば、コントロール装置40Mの電源投入時に生成されていてよい。アプリマッピングテーブル群81は、各アプリ名について、当該アプリ名の情報アプリ42の配置先の演算装置40と制御アプリ41の配置先のコントロール装置40Mとの間の通信媒体の種類に基づく。ネットワークマッピングテーブル1000、バスマッピングテーブル1100及びメモリマッピングテーブル1200の各々について、アプリ名以外の情報の少なくとも一部は、システム構成情報1420から取得された情報でよい。データマッピングテーブル1300が有する各変数名は、入力テーブル1450において共有対象とされた変数の変数名である。データマッピングテーブル1300において、変数名以外の情報の少なくとも一部は、展開部1410により決定された情報でもよいし、システム構成情報1420から取得された情報でもよい。
 設定GUI1400によれば、データ共有対象の変数は、制御側が決めた変数(本実施形態では、設定GUI1400経由で指定された変数)であり、且つ、それらの変数の各々は、制御側が決めたアクセス権でしか、アクセスされない。これにより、リアルタイム性を有する制御を優先することができる。
 なお、例えば、アプリマッピングテーブル群81における各テーブルは、例えば、図15~図17に例示の方法に従い制御アプリ41により生成されてもよい。制御アプリ41により生成された各テーブルが、制御アプリ41又は展開部1410により、各演算装置40に配布されてよい。
 図15が示す例によれば、ネットワークマッピングテーブル1000が次のように生成又は更新される(図15において、“0000”は、制御アプリ41のアプリ名であり、“0002”及び“0005”は、それぞれ、制御アプリ41と通信ネットワーク経由でデータ共有を行う情報アプリ42のアプリ名である)。すなわち、制御アプリ“0000”は、通信ネットワーク経由のデータ共有で使用する情報の取得要求を、ネットワーク制御62を介して、定期的に(又は不定期的に)ブロードキャスト送信する。当該取得要求を受けた演算装置40(典型的には拡張装置40E)において、当該演算装置40におけるアプリ(典型的には情報アプリ42)が、当該アプリのアプリ名を含む情報を返す(S1502)。制御アプリ“0000”が、返された情報に、ネットワークマッピングテーブル1000との差分があれば(或いは差分が無くても常に)、当該返された情報(例えば、差分のみ)をネットワークマッピングテーブル1000に反映する(S1503)。このようにして、システム構成変更が行われてもネットワークマッピングテーブル1000の内容を最新の内容に維持することができる。これは、例えば、第1の設定情報500中の宛先アプリ名“ALL”に対応した変数について有用である。通信ネットワーク118に演算装置40(典型的には拡張装置40E)が増設又は減設されたことに伴い情報アプリ42が追加又は削減されることがあるからである。なお、アプリのデータ共有相手として所定の条件に適合する全アプリを設定する方法としては、宛先アプリ名として“ALL”を設定することに代えて又は加えて、データ共有相手としてのアプリに関する所定の条件(例えば、アプリ名の条件、IPアドレスの条件)を設定する方法が採用されてもよい。
 図16が示す例によれば、バスマッピングテーブル1100が次のように生成又は更新される(図16において、“0000”は、制御アプリ41のアプリ名であり、“0003”及び“0007”は、それぞれ、制御アプリ41とPIOバス28経由でデータ共有を行う情報アプリ42のアプリ名である)。すなわち、制御アプリ“0000”と情報アプリ“0003”及び“0007”の各々が初期化処理を行う(S1600)。制御アプリ41は、制御アプリ41の初期化処理(S1600)において、制御共有I/F36に、制御アプリ41のアプリ名“0000”と、データ共有相手の情報アプリ42のアプリ名“0003”及び“0007”を教える。同様に、情報アプリ42(例えば、情報アプリ“0003”)も、情報アプリ42の初期化処理(S1600)において、情報共有I/F37に、自分のアプリ名“0003”とデータ共有相手の制御アプリのアプリ名“0000”を教える。このような初期化処理において、制御共有I/F36も情報共有I/F37も、PIOバス28経由でデータ共有を行う相手のアプリのアプリ名を知ることができる。初期化処理の後、制御アプリ“0000”は、PIOバス28経由のデータ共有で使用する情報(アプリ名とバス番号を含む情報)を、PIOバス28に接続されている一つ以上の拡張装置40Eの情報アプリ“0003”及び“0007”の各々から、例えば通信ネットワーク経由で受ける(S1601)。制御アプリ“0000”が、受けた情報を、バスマッピングテーブル1100に反映する(S1602)。
 図17が示す例によれば、メモリマッピングテーブル1200が次のように生成又は更新される(図17において、“0000”は、制御アプリ41のアプリ名であり、“0001”及び“0008”は、それぞれ、制御アプリ41と共有メモリ56経由でデータ共有を行う情報アプリ42のアプリ名である)。すなわち、制御アプリ“0000”と情報アプリ“0001”及び“0008”の各々が初期化処理(S1600)を行う。この初期化処理において、制御共有I/F36も情報共有I/F37も、共有メモリ56経由でデータ共有を行う相手のアプリのアプリ名を知ることができる。初期化処理の後、制御アプリ“0000”は、共有メモリ56経由のデータ共有で使用する情報(アプリ名と共有メモリ名を含む情報)を、同一のコントロール装置40Mの情報アプリ“0001”及び“0008”の各々から受ける(S1701)。制御アプリ“0000”が、受けた情報を、メモリマッピングテーブル1200に反映する(S1702)。
 以上のようにして生成又は更新されたテーブルを含むマッピングテーブル群80を基に、共有I/F経由で、アプリ間のデータ共有が行われる。図18を参照して、データ共有の一例を説明する。なお、説明を簡単にするために、制御アプリ41と情報アプリ42Aとの共有対象の変数の変数名は“変数1”とし、変数“変数1”の変数値を「変数値1」と言う。制御アプリ41と情報アプリ42Bとの共有対象の変数の変数名は“変数2”とし、変数“変数2”の変数値を「変数値2」と言う。制御アプリ41と情報アプリ42Cとの共有対象の変数の変数名は“変数3”とし、変数“変数3”の変数値を「変数値3」と言う。また、変数“変数1”~“変数3”の各々について、書き込み権限を有するアプリは、制御アプリ41のみとする。
 制御アプリ41が、制御周期毎に、スキャン処理において、変数値1~3を、ワークメモリ152(メモリ169(図1参照)の一部)に書き込む。制御アプリ41が、制御周期毎に、スキャン処理中又はスキャン処理後、ワークメモリ152に書き込んだ変数値1~3の書き込みを制御共有I/F36に指定する。以下、変数値1~3の各々のデータ共有を説明する。
 <変数値1のデータ共有>
 制御アプリ41が、変数名“変数1”と、変数名“変数1”に対応した宛先アプリ名“0001”(情報アプリ42Aのアプリ名)とを第1の設定情報500から特定し、また、自分が書き込み権限を有することを第1の設定情報500から特定する。制御アプリ41が、“変数1”と“0001”とをそれぞれ引数としたI/O指定を、制御共有I/F36に対して行う。当該I/O指定は、変数値1の書き込みの指定である。制御共有I/F36において、制御I/F部701が、当該I/O指定を受ける。制御共有部702が、当該I/O指定の引数“0001”をキーにマッピングテーブル群80X中のアプリマッピングテーブル群81Xを参照することで、変数値1のデータ共有は共有メモリ56経由であることと、共有メモリ56経由のデータ共有に必要な情報を特定する。また、制御共有部702が、当該I/O指定の引数“変数1”をキーにマッピングテーブル群80X中のデータマッピングテーブル群82Xを参照することで、変数値1の書き込み先の位置を特定する。制御共有部702が、共有メモリ56経由のデータ共有に必要な特定された情報を用いて、特定された書き込み先位置に、変数値1を書き込む。
 その後、情報アプリ42Aが、変数名“変数1”と、変数名“変数1”に対応した宛先アプリ名“0000”(制御アプリ41のアプリ名)とを第2の設定情報600Aから特定し、また、自分が読み出し権限を有することを第2の設定情報600Aから特定する。情報アプリ42Aが、“変数1”と“0000”とをそれぞれ引数としたI/O指定を、情報共有I/F37Aに対して行う。当該I/O指定は、変数値1の読み出し指定である。情報共有I/F37Aにおいて、情報I/F部801Aが、当該I/O指定を受ける。情報共有部802Aが、当該I/O指定の引数“0000”をキーにマッピングテーブル群80X中のアプリマッピングテーブル群81Xを参照することで、変数値1のデータ共有は共有メモリ56経由であることと、共有メモリ56経由のデータ共有に必要な情報を特定する。また、情報共有部802Aが、当該I/O指定の引数“変数1”をキーにマッピングテーブル群80X中のデータマッピングテーブル群82Xを参照することで、変数値1の位置を特定する。情報共有部802Aが、共有メモリ56経由のデータ共有に必要な特定された情報を用いて、特定された位置から、変数値1を読み出す。読み出された変数値1が、I/O指定に対する応答して、情報共有I/F37Aの情報I/F部801Aから情報アプリ42Aに返る。
 以上のようにして、変数値1が、制御アプリ41と情報アプリ42A間で共有される。
 <変数値2のデータ共有>
 制御アプリ41が、変数名“変数2”と、変数名“変数2”に対応した宛先アプリ名“0003”(情報アプリ42Bのアプリ名)とを第1の設定情報500から特定し、また、自分が書き込み権限を有することを第1の設定情報500から特定する。制御アプリ41が、“変数2”と“0003”とをそれぞれ引数としたI/O指定を、制御共有I/F36に対して行う。当該I/O指定は、変数値2の書き込みの指定である。制御共有I/F36において、制御I/F部701が、当該I/O指定を受ける。制御共有部702が、当該I/O指定の引数“0003”をキーにマッピングテーブル群80X中のアプリマッピングテーブル群81Xを参照することで、変数値2のデータ共有はPIOバス28経由であることと、PIOバス28経由のデータ共有に必要な情報を特定する。また、制御共有部702が、当該I/O指定の引数“変数2”をキーにマッピングテーブル群80X中のデータマッピングテーブル群82Xを参照することで、変数値2の書き込み先の位置を特定する。制御共有部702が、PIOバス28経由のデータ共有に必要な特定された情報を用いて、特定された位置に対して変数値2を書き込むためのI/Oを、PIOバス制御61Aに対して行う。PIOバス制御61Aが、当該I/Oに従い、変数値2をPIOバス28に出力する。出力された変数値2は、例えば、拡張装置40E1のPIOバス制御61Bに送られる。
 その後、情報アプリ42Bが、変数名“変数2”と、変数名“変数2”に対応した宛先アプリ名“0000”(制御アプリ41のアプリ名)とを第2の設定情報600Bから特定し、また、自分が読み出し権限を有することを第2の設定情報600Bから特定する。情報アプリ42Bが、“変数2”と“0000”とをそれぞれ引数としたI/O指定を、情報共有I/F37Bに対して行う。当該I/O指定は、変数値2の読み出し指定である。情報共有I/F37Bにおいて、情報I/F部801Bが、当該I/O指定を受ける。情報共有部802Bが、当該I/O指定の引数“0000”をキーにマッピングテーブル群80Y中のアプリマッピングテーブル群81Yを参照することで、変数値2のデータ共有はPIOバス28経由であることと、PIOバス28経由のデータ共有に必要な情報を特定する。また、情報共有部802Bが、当該I/O指定の引数“変数2”をキーにマッピングテーブル群80Y中のデータマッピングテーブル群82Yを参照することで、変数値2の位置を特定する。情報共有部802Bが、PIOバス28経由のデータ共有に必要な特定された情報を用いて、特定された位置から変数値2を読み出すためのI/Oを、PIOバス制御61Bに対して行う。PIOバス制御61Bが、PIOバス28経由の変数値2を、情報共有I/F37Bに返す。変数値2が、I/O指定に対する応答して、情報共有I/F37Bの情報I/F部801Bから情報アプリ42Bに返る。
 以上のようにして、変数値2が、制御アプリ41と情報アプリ42B間で共有される。
 <変数値3のデータ共有>
 制御アプリ41が、変数名“変数3”と、変数名“変数3”に対応した宛先アプリ名“0002”(情報アプリ42Cのアプリ名)とを第1の設定情報500から特定し、また、自分が書き込み権限を有することを第1の設定情報500から特定する。制御アプリ41が、“変数3”と“0002”とをそれぞれ引数としたI/O指定を、制御共有I/F36に対して行う。当該I/O指定は、変数値3の書き込みの指定である。制御共有I/F36において、制御I/F部701が、当該I/O指定を受ける。制御共有部702が、当該I/O指定の引数“0002”をキーにマッピングテーブル群80X中のアプリマッピングテーブル群81Xを参照することで、変数値3のデータ共有は通信ネットワーク118経由であることと、通信ネットワーク118経由のデータ共有に必要な情報を特定する。また、制御共有部702が、当該I/O指定の引数“変数3”をキーにマッピングテーブル群80X中のデータマッピングテーブル群82Xを参照することで、変数値3の書き込み先の位置を特定する。制御共有部702が、通信ネットワーク118経由のデータ共有に必要な特定された情報を用いて、特定された位置に変数値3を書き込むためのI/Oを、ネットワーク制御62Aに対して行う。ネットワーク制御62Aが、当該I/Oに従い、変数値3を通信ネットワーク118に出力する。出力された変数値3は、例えば、拡張装置40E2のネットワーク制御62Bに送られる。
 その後、情報アプリ42Cが、変数名“変数3”と、変数名“変数3”に対応した宛先アプリ名“0000”(制御アプリ41のアプリ名)とを第2の設定情報600Cから特定し、また、自分が読み出し権限を有することを第2の設定情報600Cから特定する。情報アプリ42Cが、“変数3”と“0000”とをそれぞれ引数としたI/O指定を、情報共有I/F37Cに対して行う。当該I/O指定は、変数値3の読み出し指定である。情報共有I/F37Cにおいて、情報I/F部801Cが、当該I/O指定を受ける。情報共有部802Cが、当該I/O指定の引数“0000”をキーにマッピングテーブル群80Z中のアプリマッピングテーブル群81Zを参照することで、変数値3のデータ共有は通信ネットワーク118経由であることと、通信ネットワーク118経由のデータ共有に必要な情報を特定する。また、情報共有部802Cが、当該I/O指定の引数“変数3”をキーにマッピングテーブル群80Z中のデータマッピングテーブル群82Zを参照することで、変数値3の位置を特定する。情報共有部802Cが、通信ネットワーク118経由のデータ共有に必要な特定された情報を用いて、特定された位置から変数値3を読み出すためのI/Oを、ネットワーク制御62Bに対して行う。ネットワーク制御62Bが、通信ネットワーク118経由の変数値3を、情報共有I/F37Cに返す。変数値3が、I/O指定に対する応答して、情報共有I/F37Cの情報I/F部801Cから情報アプリ42Cに返る。
 以上のようにして、変数値3が、制御アプリ41と情報アプリ42C間で共有される。
 図18が示す例では、変数値1~3のいずれについても、書き手は制御アプリ41であり読み手は情報アプリ42であるが、書き手と読み手が逆でも、データ共有の方法は実質的に同様である。
[第2の実施形態]
 第2の実施形態では、システム構成変更に伴い適宜にアプリ再配置が実施される。以下、第2の実施形態を説明する。その際、第1の実施形態との相違点を主に説明し、第1の実施形態との共通点については説明を省略又は簡略する。
 図19は、システム構成変更前の第2の実施形態に係るコントロールシステムの一例を示す。図20は、システム構成変更後の第2の実施形態に係るコントロールシステムの一例を示す。
 図19及び図20が示すように、各演算装置40が、コントロールシステム2109の構成を表す全体構成テーブル191と、当該演算装置40の構成を表す個別構成テーブル192とを有する。全体構成テーブル191は、全ての演算装置40の個別構成テーブル192が集約された情報である。具体的には、全体構成テーブル191は、複数の演算装置40の各々について当該演算装置40がRT性(リアルタイム性)を有するか否かと当該演算装置40が有する一つ以上のインターフェースデバイスとを表す情報を含む。各演算装置40について、個別構成テーブル192は、当該演算装置40がRT性を有するか否かと当該演算装置40が有する一つ以上のインターフェースデバイスとを表す情報を含む。本実施形態では、全ての演算装置40が全体構成テーブル191を共有するが、全体構成テーブル191は、全てのコントロール装置40M(一部の演算装置40の一例)で共有され拡張装置40Eには共有されなくてもよい。或いは、全体構成テーブル193は、各演算装置40又は各コントロール装置40Mに共有されることに代えて、管理システム101(複数の演算装置40のうちの少なくとも一つと通信可能に接続されている計算機システムの一例)に格納されてもよい。
 図19及び図20が示すように、各演算装置40が、アプリケーションプログラムの配置を制御する配置制御部67を有する。配置制御部67は、所定のコンピュータプログラムがCPUに実行されることにより実現される。本実施形態では、全体構成テーブル191を各演算装置40が有するため、配置制御部67は、各演算装置40に備えられるが、配置制御部67は、各コントロール装置40Mに備えられ拡張装置40Eに備えられなくてもよいし、演算装置40に代えて(又は加えて)管理システム101に備えられてもよい。図19及び図20が示す例では、コントロール装置40M1の配置制御部67が、マスタの配置制御部67M1であり、各拡張装置40Eの配置制御部67が、スレーブの配置制御部67Eである。
 配置制御部67M1が、制御アプリ41の再配置が必要か否かの第1の判定を行う。第1の判定の結果が真の場合、配置制御部67Mが、一つ又は複数の制御アプリ41から再配置対象の制御アプリ41Bを決定し、全体構成テーブル191を基に、再配置対象の制御アプリ41Bの配置先を、RT性と制御アプリ41Bが利用するインターフェースデバイスとを有するコントロール装置40M2に決定し、制御アプリ41Bを、コントロール装置40M1に代えてコントロール装置40M2に配置する。これにより、RT性を必要とする制御を行うコントロールシステム2109のシステム構成変更を、RT性を維持しつつ柔軟に行うことができる。
 なお、制御アプリ41Bの再配置のために、配置制御部67M1が、当該制御アプリ41BのVCPU37Bを、コントロール装置40M1からコントロール装置40M2に移行し、移行されたVCPU37Bに、制御アプリ41Bを配置してもよい。或いは、配置制御部67M1は、制御アプリ41Bを含んだVCPU37Bのイメージをコントロール装置40M2に展開することで、制御アプリ41Bのコントロール装置40M1からコントロール装置40M2への再配置(配置変更)を行ってよい。
 また、図20が示すように、演算装置40の増加が検出された場合に、配置制御部67M1が、上述の第1の判定(制御アプリ41の再配置の必要性の判定)を行う。第1の判定を行う契機は、演算装置40の減少が検出されたことでもよい。演算装置40が増加又は減少するということは、コントロールシステムのハードウェアリソースが増加又は減少するということであり、結果として、アプリ配置が最適でなくなるということである。このような契機で制御アプリ41(及び情報アプリ42)の再配置が行われるので、適切なアプリ配置を維持することができる。なお、「演算装置40の減少」は、演算装置40がコントロールシステムから取り外されることに代えて又は加えて、障害発生又は別の理由により演算装置40が停止することでもよい。
 配置制御部67M1は、図21及び図22に例示の構成管理GUI2101を、例えば設定端末29に表示できる。図21は、システム構成変更前のコントロールシステム(図19に記載のコントロールシステム)についての構成管理GUIの一例を示す。図22は、システム構成変更後のコントロールシステム(図20に記載のコントロールシステム)についての構成管理GUIの一例を示す。構成管理GUI2101は、いずれの制御アプリ41及びいずれの情報アプリ42がいずれの演算装置40に配置されているかを表示する。
 具体的には、例えば、構成管理GUI2101は、全体構成テーブル191から特定される複数の演算装置40をそれぞれ表す複数の表示オブジェクト21を有する。表示オブジェクト21において、“1-0”や“1-1”は、演算装置40のID(後述のノードID)である。演算装置40の表示オブジェクト21は、当該演算装置40に配置されているVCPU37の表示オブジェクト22を有する。VCPU37の表示オブジェクト22は、当該VCPU37に配置されている制御アプリ41又は情報アプリ42の表示オブジェクト23を有する。ユーザは、構成管理GUI2101から、アプリ配置を含むコントロールシステム構成を俯瞰的に理解できる。
 構成管理GUI2101は、演算装置40の選択を受け付ける第1のUI(例えばGUI部品)、選択された演算装置40に対するVCPU追加の指示を受け付ける第2のUI、及び、追加されたVCPU37に入れるアプリの選択を受け付ける第3のUIを有してもよい。演算装置40の選択は、演算装置40の表示オブジェクト21を指定(例えばクリック)することでもよいし、演算装置40のID又はIPアドレスを指定(例えばクリック又は手入力)することであってもよい。VCPU追加は、追加するVCPU37の数を入力することでよい。
 また、配置制御部67M1は、構成管理GUI2101に、各演算装置40について、全体構成テーブル191を基に特定される空きハードウェアスペック(例えば、各種計算リソースの空きリソースの種類及びリソース量)を表示してもよい。また、配置制御部67M1は、制御アプリ41又は情報アプリ42の選択を受け付けた場合、選択されたアプリが必要とするハードウェアスペックを、例えば後述のアプリテーブル2400(図24参照)から特定し、特定されたハードウェアスペックを満たす空きハードウェアスペックを持つ演算装置40を、全体構成テーブル191を基に特定し、特定された演算装置40の表示オブジェクト21を強調表示してもよい。これにより、例えば次のことが期待できる。すなわち、制御アプリ41の配置後に情報アプリ42をユーザが配置することが考えられるが、ユーザは、構成管理UI2101を利用することで、コントロールシステム2109の構成の詳細(例えば、個々の演算装置40のハードウェアスペック)を意識せずに情報アプリ42をコントロールシステム2109に導入できる。
 図23は、全体構成テーブル191の構成を示す。
 全体構成テーブル191は、各演算装置40に保持されるが、それに代えて又は加えて、管理システム101に保持されてよい。全体構成テーブル191は、演算装置40毎にレコードを有する。演算装置40毎のレコードが含む情報全体が、当該演算装置40の個別構成テーブル192に相当する。各レコードは、IPアドレス1911、ノードID1912、装置種類1913、RT性1914、最速制御周期1915、CPU1916、メモリ1917、IO1918及びアプリ名1919といった情報を保持する。一つの演算装置40を例に取る(図23の説明において「対象装置」)。
 IPアドレス1911は、対象装置のIPアドレスを表す。
 ノードID1912は、対象装置のIDを表す。「ノード」とは、分散システムとしてのコントロールシステムにおける要素としての演算装置を意味する。ノードIDの構成は、「P-Q」である。「P」は、PIOバス28(図1及び図2参照)の識別番号である(Pは、自然数)。「Q」は、PIOバス28に接続されている演算装置の通し番号である(Qは、0以上の整数)。本実施形態では、Q=0の演算装置が、コントロール装置40Mであり、Q>0の演算装置が、拡張装置40Eである。Qが0に近い自然数である程、拡張装置40Eがコントロール装置40Mに距離的に近いことを意味する。Qは、例えば、バックボードに設けられたコネクタ(スロット)の番号でよい。本実施形態では、一つのPIOバス28には一つのコントロール装置40Mが存在し、異なる複数のPIOバス28にそれぞれ異なる複数のコントロール装置40Mが存在する。通信ネットワーク118経由で、異なるPIOバス28に存在する装置40間の通信が可能である。
 装置種類1913は、対象装置がコントロール装置40Mであるか拡張装置40Eであるかを表す。本実施形態では、ノードID1912から対象装置がコントロール装置40Mであるか拡張装置40Eであるかを特定可能なため、装置種類1913は無くてもよいが、一つのPIOバス28に複数のコントロール装置40Mが接続され得るシステムについては、装置種類1913は有用である。
 RT性1914は、対象装置がRT性(RT性を満たす性能)を持っているか否かを表す。“有”は、RT性があることを意味し、“無”は、RT性が無いことを意味する。
 最速制御周期1915は、対象装置が対応可能(カバーする)最短の制御周期を表す。例えば、対象装置の最速制御周期1915が“1ms”の場合、“1ms”かそれよりも長い制御周期のアプリが対象装置に配置されてよい。
 CPU1916は、対象装置のハードウェアスペックを表す情報の一例であり、対象装置が有するCPUのスペックを表す。CPUスペックは、クロック数に加えて、CPUコアの数といった他種の要素を含んでもよい。
 メモリ1917は、対象装置のハードウェアスペックを表す情報の一例であり、対象装置が有するメモリの容量を表す。
 IO1918は、対象装置のハードウェアスペックを表す情報の一例であり、対象装置が有するインターフェースデバイス(例えばI/Oモジュール119)の種類を表す。
 アプリ名1919は、対象装置に配置されているアプリの名前を表す。
 図24は、アプリテーブル2400の構成を示す。
 アプリテーブル2400も、各演算装置40に保持されてもよいし、管理システム101に保持されてもよい。アプリテーブル2400は、コントロールシステム109に存在するアプリ毎に、アプリ名901及び通信媒体種類902の他に、RT性2411、制御周期2412、必要CPU2413、必要メモリ2414及び利用IO2415といった情報を保持する。一つのアプリを例に取る(図24の説明において「対象アプリ」)。
 RT性2411は、対象アプリにRT性が必要とされるか否かを表す。“有”は、RT性が必要であることを意味し、“無”は、RT性が不要であることを意味する。本実施形態では、RT性2411“有”のアプリが、制御アプリ41であり、RT性2411“無”のアプリが、情報アプリ42である。
 制御周期2412は、対象アプリに必要とされる制御周期を表す。制御周期は、上述したように、スキャン処理に要する時間であるスキャンタイムと、スキャンタイム以外の時間である待機時間とで構成された時間である。情報アプリ42による情報処理は、待機時間において行われる。このため、「対象アプリに必要とされる制御周期」とは、対象アプリが制御アプリ41であるか情報アプリ42であるかによって異なる。具体的には、下記の通りである。
・対象アプリが制御アプリ41の場合、「対象アプリに必要とされる制御周期」とは、制御アプリ41が実行されることにより行われるスキャン処理のスキャンタイムを考慮して定められた制御周期である。
・対象アプリが情報アプリ42の場合、「対象アプリに必要とされる制御周期」とは、情報アプリ42が実行されることにより行われる情報処理の処理時間に基づく期待される待機時間を考慮して定められた制御周期である。待機時間の長さは、制御周期とスキャンタイムに依存する。このため、例えば、情報アプリ42について、「対象アプリに必要とされる制御周期」は、当該情報アプリ42による情報処理の処理時間と、スキャンタイムの最長時間とに基づいて決定されてよい。
 必要CPU2413は、対象アプリに必要とされるハードウェアスペックの一例であり、対象アプリが必要とするCPUスペックを表す。
 必要メモリ2414は、対象アプリに必要とされるハードウェアスペックの一例であり、対象アプリが必要とするメモリスペックを表す。
 利用IO2415は、対象アプリに必要とされるハードウェアスペックの一例であり、対象アプリが利用するインターフェースデバイスの種類を表す。
 図23及び図24が示す例によれば、一例として次の通りである。アプリ名901が“0000”であるアプリは、RT性2411が“有”のため、制御アプリ41である。配置制御部67M1は、全体構成テーブル191から、RT性1914“有”と、この制御アプリ41の利用IO2415に適合するIO1918とを有するレコードを特定し、当該レコードからノードID1912“1-0”を特定する。配置制御部67M1は、特定されたノードID1912“1-0”に対応したコントロール装置40Mに、制御アプリ41を配置する。具体的には、例えば、配置制御部67M1は、次の処理を行ってよい。
(S1)配置制御部67M1は、アプリ名901“0000”の制御アプリ41が必要とするハードウェアスペック(例えばCPUスペック及びメモリスペック)を、アプリテーブル2400から特定してよい。
(S2)配置制御部67M1は、対象装置の空きハードウェアスペックを、全体構成テーブル191から特定してよい。例えば、対象装置は、RT性1914“有”とこの制御アプリ41の利用IO2415に適合するIO1918とに対応したコントロール装置40M(つまりノードID1912“1-0”に対応したコントロール装置40M)である。空きハードウェアスペックは、例えば、対象装置のハードウェアスペック(例えば、CPUスペック及びメモリスペック)と、対象装置に配置済みの全アプリの必要ハードウェアスペックの合計とを基に特定されてよい。
(S3)配置制御部67M1は、S2で特定された空きハードウェアスペックがS1で特定された必要ハードウェアスペックを満たすか否かを判定する。全てのリソース種類について空きハードウェアスペックが必要ハードウェアスペックを満たす場合、判定結果が真でよい。一方、少なくとも一つリソース種類について空きハードウェアスペックが必要ハードウェアスペックを満たさない場合、判定結果が偽でよい。
(S4)S3の判定結果が真の場合、配置制御部67M1は、対象装置に制御アプリ41を配置する。
(S5)S3の判定結果が偽の場合、配置制御部67M1は、対象装置を変更し、S2を実行する。変更後の対象装置は、下記のうちのいずれかでよい。
・RT性1914“有”とこの制御アプリ41の利用IO2415に適合するIO1918とに対応した別のコントロール装置40M。
・ノードID1912“1-0”に対応したコントロール装置40Mと同じPIOバス28に接続されており対象装置として未選択の拡張装置40Eのうち、当該コントロール装置40Mから最も近くにある拡張装置40E。
 さて、コントロール装置40M及び拡張装置40Eのいずれも、互いのメッセージ送受信を通じてコントロールシステムへの動的な参入又は離脱が可能である。演算装置40の参入時に、新規参集した演算装置40の個別構成テーブル192を既存の全演算装置40が共有することで、全体構成テーブル191の更新が行われる。配置制御部67(又はユーザ)は、当該全体構成テーブル191を基に、制御アプリ41及び情報アプリ42の最適な配置を決定し、それらのアプリを決定した最適な配置先に配置する。
 図25は、全体構成テーブル191の更新の処理の一例を示す。
 図25が示す例によれば、既存のノード1-0は、コントロール装置40M1である。既存のノード2-0は、コントロール装置40M2である。新規参集ノード1-1は、拡張装置40E11である。図25の説明では、便宜上、演算装置を「ノード」と言う。また、以下に説明するS2501~S2512の処理は、ノード内の配置制御部67により行われるが、説明を簡単にするために、処理主体をノードとする。
 ノード1-1が、PIOバス28経由で、参入通知をブロードキャストする(S2501)。これにより、PIOバス28に接続されているノード1-0が、ノード1-1の参入を検出する。
 ノード1-0が、例えばネットワーク118経由で、ノード1-1の新規参入の参入通知をブロードキャストする。これにより、ネットワーク118に接続されているコントロール装置の一例としてのノード2-0が、ノード1-1の新規参入を検出する。
 ノード1-0が、S2501の参入通知に対する参入応答をノード1-1に返す(S2503)。ノード1-1が、参入応答の送信元のノード1-0に、ノード1-1の個別構成テーブル192を送信する(S2504)。ノード1-0が、ノード1-1の個別構成テーブル192をノード1-0の全体構成テーブル191に追加する、つまりノード1-0の全体構成テーブル191を更新する(S2505)。ノード1-0が、ノード1-1に、ノード1-0の個別構成テーブル192を送信する(S2506)。ノード1-1が、ノード1-0の個別構成テーブル192をノード1-1の全体構成テーブル191に追加する、つまりノード1-1の全体構成テーブル191を更新する(S2507)。
 ノード1-1とノード2-0の間で、S2503~S2507と同様の処理が行われる(S2508~S2512)。
 このように、S2503~S2507と同様の処理が、新規参集ノード1-1と、ノード1-0やノード2-0といった既存の各ノードとの間で行われる。これにより、全ノードが同一の全体構成テーブル191を共有することが維持される。
 なお、全体構成テーブル191の更新の流れは、図25が例示の流れに限られない。例えば、次の流れが採用されてよい。すなわち、ノード1-0が、S2506において、新規参集ノード1-1からの個別構成テーブル192を含んだ更新後の全体構成テーブル191をノード1-1に送信する。ノード1-1が、その全体構成テーブル191を、ノード1-1の全体構成テーブル191として保持する。S2502及びS2508~S2512が行われない。
 また、ノード1-1が新規離脱ノードであるとした場合、次の処理が行われてよい。すなわち、ノード1-0が、ノード1-1の新規離脱を検出し、ノード1-1に対応したレコードを全体構成テーブル191から除去する。ノード1-0が、更新後の全体構成テーブル191から特定される各ノードに、更新後の全体構成テーブル191を送信する。なお、ノード1-0が接続されているPIOバスに接続されておらず、且つ、ネットワーク118にも接続されていないノードがある場合、当該ノードには、当該ノードが接続されているPIOバスに接続されているいずれかのネットワーク接続ノード(ネットワーク118に接続されているノード(例えばコントロール装置40M))を通じて、更新後の全体構成テーブル191が送信されてよい。
 図26は、アプリ配置制御処理の一例を示す。
 アプリ配置制御処理は、アプリ配置が最適か否かの判定(例えばS2601及びS2602の少なくとも一つ)と、当該判定の結果が偽の場合に行われるアプリ再配置(例えばS2605及びS2608の少なくとも一つ)とを含む。アプリ配置制御処理は、演算装置40の増加及び減少のうちのいずれかが検出され、全体構成テーブル191の更新が終了した後に行われてよい。更新後の全体構成テーブル191から特定される、増加した又は減少する演算装置40は、例えば以下の通りでよい。
・増加した演算装置40は、アプリ名1919がブランクである演算装置40、又は、図示しない増加フラグが例えばアプリ名1919として全体構成テーブル191に設定された演算装置40である。
・減少する演算装置40は、図示しない減少フラグが例えばアプリ名1919として全体構成テーブル191に設定された演算装置40である。
 アプリ配置制御処理は、コントロールシステム2109に存在するいずれの配置制御部67によって行われてもよいが、以下の説明では、演算装置40の増加又は減少を検出したいずれかのコントロール装置40Mの配置制御部67Mが行うこととする。
 配置制御部67Mは、増加した演算装置40としてRT性1914“有”の演算装置40があるか否かを判定する(S2600)。S2600の判定結果が真の場合、S2601の判定(制御アプリ41の再配置が必要か否かの判定)が行われる。増加した演算装置40がRT性1914“有”の演算装置40である場合、増加した演算装置40に制御アプリ41を再配置することが負荷分散或いは他の観点で好ましいことが期待されるからである。一方、S2600の判定結果が偽の場合、S2601の判定がスキップされ、S2602の判定(情報アプリ42の再配置が必要か否かの判定)が行われる。増加した演算装置40がRT性1914“無”の演算装置40である場合、増加した演算装置40に制御アプリ41を配置することは不可のためである。このように、効率的な判定が行われる。
 S2600の判定結果が真の場合、上述したように、S2601の判定が行われる。すなわち、配置制御部67Mが、制御アプリ41の再配置が必要か否かの判定を行う(S2601)。「制御アプリ41の再配置が必要」のケースは、例えば以下のうちのいずれかでよい。
・増加した演算装置として、RT性1914“有”の演算装置40があり、且つ、同一の演算装置に複数の制御アプリ41が存在する。
・減少する演算装置に対応したアプリ名1919に、RT性2411“有”のアプリである制御アプリ41のアプリ名が含まれている。
 S2601の判定結果が真の場合、配置制御部67Mが、再配置対象の制御アプリ41を決定する(S2603)。「再配置対象の制御アプリ41」は、例えば以下のうちのいずれかでよい。
・空きハードウェアスペックが相対的に少ない演算装置40に配置されている制御アプリ。
・同一の演算装置40に配置されている複数の制御アプリのうちのいずれかの制御アプリ。
・減少する演算装置に配置されている制御アプリ。
 S2603の後、配置制御部67Mが、全体構成テーブル191を基に、再配置対象の制御アプリ41の配置先を、RT性1914“有”と再配置対象の制御アプリ41の利用IO2415を満たすIO1918とに対応した演算装置を決定する(S2604)。
 S2604の後、配置制御部67Mが、再配置対象の制御アプリ41を、当該制御アプリ41が配置されている演算装置40に代えて、S2604で決定された演算装置に配置するする(S2605)。配置制御部67Mは、例えば、S2603及びS2604の決定内容(再配置対象の制御アプリとそれの再配置先)を表す情報をユーザに提示し、ユーザから承認を受けた場合にS2605を行ってもよい。或いは、配置制御部67Mは、そのような情報をユーザに提示すること無しに自動的にS2605を行ってもよい。その後、処理が、S2601に戻る。
 S2600の判定結果が偽の場合、又は、制御アプリ41の再配置の結果として(或いは制御アプリ41の再配置無しに)S2601の判定結果が偽の場合、配置制御部67Mが、情報アプリ42の再配置が必要か否かの判定を行う(S2602)。
 S2602の判定結果が真の場合、配置制御部67Mが、再配置対象の情報アプリ42を決定する(S2606)。「再配置対象の情報アプリ42」は、例えば以下のうちのいずれかでよい。
・空きハードウェアスペックが相対的に少ない演算装置40に配置されている情報アプリ。
・同一の演算装置40に配置されている複数の制御アプリのうちのいずれかの情報アプリ。
・減少する演算装置に配置されている情報アプリ。
 S2606の後、配置制御部67Mが、全体構成テーブル191を基に、再配置対象の情報アプリ42の配置先を、当該情報アプリ42が必要とするハードウェアスペックを満たす空きハードウェアスペックを持つ演算装置に決定する(S2607)。
 S2607の後、配置制御部67Mが、再配置対象の情報アプリ42を、当該情報アプリ42が配置されている演算装置40に代えて、S2607で決定された演算装置に配置するする(S2608)。これにより、制御アプリ41に加えて情報アプリ42の最適な配置を維持することができる。なお、配置制御部67Mは、例えば、S2606及びS2607の決定内容(再配置対象の情報アプリとそれの再配置先)を表す情報をユーザに提示し、ユーザから承認を受けた場合にS2608を行ってもよい。或いは、配置制御部67Mは、そのような情報をユーザに提示すること無しに自動的にS2609を行ってもよい。その後、処理が、S2601に戻る。
 以上が、第2の実施形態の説明である。
 なお、全体構成テーブル191は、各コントロール装置40Mが共有してよい。そして、各コントロール装置40Mが、配置制御部67を有してよい。コントロール装置40Mは、典型的には、RT性に加えて、制御対象装置12が接続されるインターフェースデバイスを有する演算装置である。従って、典型的には、制御アプリ41は、コントロール装置40Mに配置され、結果として、コントロール装置40Mが、制御対象装置12を制御する。このようなコントロール装置40Mが、アプリ再配置制御処理の実行タイミングを制御できるので、RT性を維持する範囲で、最適なアプリ配置を維持できる。
 また、複数の演算装置40のうちの少なくとも一つと通信可能に接続されている計算機システムの一例である管理システム101に、配置制御部67が備えられてよい。全体構成テーブル191は、管理システム101に保持されてよい。これにより、複数の工場10のような複数の場所に設けられた複数のコントロールシステムの各々におけるアプリ配置を一元的に管理及び制御することができる。
 また、詳細説明を省略したが、第2の実施形態と第1の実施形態との組合せが可能である。すなわち、第2の実施形態でも、通信媒体が共有メモリ56、PIOバス28及び通信ネットワーク118のいずれであってもデータ共有を実現する共有I/F(共有インターフェース)が設けられる。当該共有I/Fは、OSが一般に提供する共有メモリ用のI/Fよりも上のレイヤのI/Fである。共有I/Fは、アプリからI/O指定(例えば、関数呼出し)を受け付けるが、当該I/O指定において、宛先アプリの名前と共有データのデータ項目の名前とがそれぞれ引数とされていれば、当該アプリと当該宛先アプリとの間の通信媒体の種類に関わらずデータ共有が実現される。また、各演算装置40に共有I/Fが存在する。共有I/Fの存在により、通信媒体の種類をアプリが意識する必要の無いデータ共有が可能である。このため、共有メモリ56の他に通信ネットワーク118とPIOバス28の少なくとも一つをアプリ間のデータ共有に利用することが可能なコントロールシステム2109について、アプリ再配置を含むシステム構成変更を、制御のリアルタイム性を維持しつつ柔軟に行うことができる。
 以上、幾つかの実施形態を説明したが、これらは本発明の説明のための例示であって、本発明の範囲をこれらの実施形態にのみ限定する趣旨ではない。本発明は、他の種々の形態でも実施することが可能である。
 109…コントロールシステム

Claims (11)

  1.  一つ又は複数の制御対象装置を制御するコントロールシステムであって、
     それぞれがインターフェース装置、記憶装置及びそれらに接続されたプロセッサを有する複数の演算装置と、
     プログラムの配置を制御する配置制御部と
    を備え、
     前記複数の演算装置の各々について、当該演算装置のインターフェース装置は、当該演算装置が有する一つ以上のインターフェースデバイスであり、
     前記複数の演算装置は、一つ又は複数の制御プログラムと、一つ又は複数の情報プログラムとを有し、
     前記一つ又は複数の制御プログラムの各々について、当該制御プログラムは、当該制御プログラムについて定められた制御周期毎に、制御対象装置を制御する処理でありリアルタイム性を有する処理であるスキャン処理を当該制御周期内に行うプログラムであり、
     前記一つ又は複数の情報プログラムの各々について、当該情報プログラムは、当該情報プログラムについて定められた情報処理を行うプログラムであり、
     前記配置制御部が、
      制御プログラムの再配置が必要か否かの第1の判定を行い、
      当該第1の判定の結果が真の場合、
        前記一つ又は複数の制御プログラムから再配置対象の制御プログラムを決定し、
        前記複数の演算装置の各々について当該演算装置がリアルタイム性を有するか否かと当該演算装置が有する一つ以上のインターフェースデバイスとを表す情報を含んだ全体構成情報を基に、前記再配置対象の制御プログラムの配置先を、リアルタイム性と前記再配置対象の制御プログラムが利用するインターフェースデバイスとを有する演算装置に決定し、
        前記再配置対象の制御プログラムを、当該制御プログラムが配置されている演算装置に代えて、前記決定された演算装置に配置する、
    コントロールシステム。
  2.  前記全体構成情報において、各演算装置の情報は、当該演算装置のハードウェアスペックを表す情報を含み、
     前記第1の判定の結果が偽の場合、前記配置制御部が、
      情報プログラムの再配置が必要か否かの第2の判定を行い、
      当該第2の判定の結果が真の場合、
        前記一つ又は複数の情報プログラムから再配置対象の情報プログラムを決定し、
        前記全体構成情報を基に、前記再配置対象の情報プログラムの配置先を、当該情報プログラムが必要とするハードウェアスペックを満たす空きハードウェアスペックを持つ演算装置に決定し、
        前記再配置対象の情報プログラムを、当該情報プログラムが配置されている演算装置に代えて、前記決定された演算装置に配置する、
    請求項1に記載のコントロールシステム。
  3.  演算装置の増加又は減少が検出された場合に、前記配置制御部が、前記第1の判定を行う、
    請求項2に記載のコントロールシステム。
  4.  演算装置は、リアルタイム性を有する第1の演算装置と、リアルタイム性を有しない第2の演算装置とのうちのいずれかであり、
     増加した演算装置として第1の演算装置がある場合に、前記配置制御部が、前記第1の判定を行い、
     増加した演算装置として第1の演算装置がなく第2の演算装置がある場合に、前記配置制御部が、前記第1の判定を行うこと無しに前記第2の判定を行う、
    請求項3に記載のコントロールシステム。
  5.  演算装置は、制御対象装置が接続されるインターフェースデバイスを有する演算装置であるコントロール装置と、制御対象装置が接続されるインターフェースデバイスとは別種のインターフェースデバイスを有する演算装置である拡張装置とのうちのいずれかであり、
     少なくとも各コントロール装置が、前記全体構成情報を共有し、
     少なくとも各コントロール装置が、前記配置制御部を有する、
    請求項1に記載のコントロールシステム。
  6.  前記複数の演算装置のうちの少なくとも一つと通信可能に接続されている計算機システムに前記配置制御部が備えられる、
    請求項1に記載のコントロールシステム。
  7.  前記一つ又は複数の演算装置が、一つ又は複数の共有インターフェースを有し、
     前記一つ又は複数の制御プログラムの各々について、当該制御プログラムについて設定される情報である第1の設定情報は、当該制御プログラムと当該制御プログラムの通信相手としての一つ以上の情報プログラムの各々との間の通信媒体の種類に依存しない情報であり、
     前記一つ又は複数の情報プログラムの各々について、当該情報プログラムについて設定される情報である第2の設定情報は、当該情報プログラムと当該情報プログラムの通信相手としての一つ以上の制御プログラムの各々との間の通信媒体の種類に依存しない情報であり、
     前記一つ又は複数の演算装置の各々において、
      制御プログラム又は情報プログラムである第1のプログラムが、当該演算装置における共有インターフェースに対して、当該第1のプログラムについての設定情報中の情報を引数としてI/O(Input/Output)指定を行い、
      当該共有インターフェースが、当該I/O指定に応答して、
        当該I/O指定の引数に対応した情報を、通信媒体種類に依存した情報を含んだ情報であるマッピング情報から特定し、
        当該特定された情報を基に、当該第1のプログラムと当該第1のプログラムの通信相手としての制御プログラム又は情報プログラムである第2のプログラムとの間の通信媒体の種類に依存したI/Oを行う、
    請求項1に記載のコントロールシステム。
  8.  前記一つ又は複数の制御プログラムの各々について、当該制御プログラムの第1の設定情報は、共有対象のデータである共有データのデータ項目の識別情報である項目識別情報と共有相手の情報プログラムのプログラム識別情報との関係を表す情報を含み、
     前記一つ又は複数の情報プログラムの各々について、当該情報プログラムの第2の設定情報は、共有データのデータ項目の識別情報である項目識別情報と共有相手の制御プログラムのプログラム識別情報との関係を表す情報を含み、
     前記一つ又は複数の演算装置の各々において、
      前記I/O指定の引数として、第1の引数と第2の引数があり、
      当該第1の引数は、前記第2のプログラムのプログラム識別情報であり、
      当該第2の引数は、前記第1のプログラムと前記第2のプログラムが共有する共有データのデータ項目の項目識別情報であり、
      前記マッピング情報は、プログラム識別情報と通信媒体種類に依存したデータ共有方法を表すデータ共有方法情報との関係を表すプログラムマッピング情報と、項目識別情報と共有データの入力元又は出力先の位置を表す共有位置情報との関係を表すデータマッピング情報とを含み、
      前記第1の引数に対応した情報は、データ共有方法情報であり、
      前記第2の引数に対応した情報は、共有位置情報であり、
      前記共有インターフェースにより行われるI/Oは、特定されたデータ共有方法情報及び共有位置情報に従うI/Oであって、前記第2の引数とされた項目識別情報が表すデータ項目に対応した共有データのI/Oである、
    請求項7に記載のコントロールシステム。
  9.  制御プログラムを有する演算装置は、共有メモリを有し、
     制御プログラムを有する演算装置と、少なくとも一つの演算装置とが、回路基板上のバスに接続されており、
     制御プログラムを有する演算装置と、少なくとも一つの演算装置とが、通信ネットワークに接続されており、
     前記第1のプログラムは、制御プログラムであり、
     前記第2のプログラムは、情報プログラムであり、
     前記第1のプログラムと前記第2のプログラムとの間のデータ共有において利用される通信媒体の種類は、共有メモリ、バス及び通信ネットワークのいずれかである、
    請求項7に記載のコントロールシステム。
  10.  前記配置制御部が、いずれの制御プログラム及びいずれの情報プログラムがいずれの演算装置に配置されているかを表示したUI(User Interface)を提供する、
    請求項1に記載のコントロールシステム。
  11.  一つ又は複数の制御対象装置を制御するコントロール方法であって、
     制御プログラムの再配置が必要か否かの第1の判定を行い、
      それぞれがインターフェース装置、記憶装置及びそれらに接続されたプロセッサを有する複数の演算装置の各々について、当該演算装置のインターフェース装置は、当該演算装置が有する一つ以上のインターフェースデバイスであり、
      前記複数の演算装置は、一つ又は複数の制御プログラムと、一つ又は複数の情報プログラムとを有し、
      前記一つ又は複数の制御プログラムの各々について、当該制御プログラムは、当該制御プログラムについて定められた制御周期毎に、制御対象装置を制御する処理でありリアルタイム性を有する処理であるスキャン処理を当該制御周期内に行うプログラムであり、
      前記一つ又は複数の情報プログラムの各々について、当該情報プログラムは、当該情報プログラムについて定められた情報処理を行うプログラムであり、
     前記第1の判定の結果が真の場合、
      前記一つ又は複数の制御プログラムから再配置対象の制御プログラムを決定し、
      前記複数の演算装置の各々について当該演算装置がリアルタイム性を有するか否かと当該演算装置が有する一つ以上のインターフェースデバイスとを表す情報を含んだ全体構成情報を基に、前記再配置対象の制御プログラムの配置先を、リアルタイム性と前記再配置対象の制御プログラムが利用するインターフェースデバイスとを有する演算装置に決定し、
      前記再配置対象の制御プログラムを、当該制御プログラムが配置されている演算装置に代えて、前記決定された演算装置に配置する、
    コントロール方法。
PCT/JP2021/030634 2020-09-07 2021-08-20 コントロールシステム WO2022050090A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022546232A JP7465984B2 (ja) 2020-09-07 2021-08-20 コントロールシステム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-150170 2020-09-07
JP2020150170 2020-09-07

Publications (1)

Publication Number Publication Date
WO2022050090A1 true WO2022050090A1 (ja) 2022-03-10

Family

ID=80490848

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/030634 WO2022050090A1 (ja) 2020-09-07 2021-08-20 コントロールシステム

Country Status (2)

Country Link
JP (1) JP7465984B2 (ja)
WO (1) WO2022050090A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0736529A (ja) * 1993-07-15 1995-02-07 Mitsubishi Electric Corp 数値制御装置の制御ソフトウェア実行システム
JP2008174098A (ja) * 2007-01-18 2008-07-31 Toyota Motor Corp 車両用制御システム
JP2019012456A (ja) * 2017-06-30 2019-01-24 株式会社 日立産業制御ソリューションズ タスク割当て装置、および、タスク割当て方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0736529A (ja) * 1993-07-15 1995-02-07 Mitsubishi Electric Corp 数値制御装置の制御ソフトウェア実行システム
JP2008174098A (ja) * 2007-01-18 2008-07-31 Toyota Motor Corp 車両用制御システム
JP2019012456A (ja) * 2017-06-30 2019-01-24 株式会社 日立産業制御ソリューションズ タスク割当て装置、および、タスク割当て方法

Also Published As

Publication number Publication date
JP7465984B2 (ja) 2024-04-11
JPWO2022050090A1 (ja) 2022-03-10

Similar Documents

Publication Publication Date Title
US7500067B2 (en) System and method for allocating memory to input-output devices in a multiprocessor computer system
US8819675B2 (en) Virtual machine monitor and multiprocessor system
JP2017187993A (ja) 制御装置、制御方法およびプログラム
CN105224459A (zh) 一种linux平台下测试bmc通过oem命令读写bios配置功能的方法
CN108011739B (zh) 一种虚拟网络的部署方法、装置及系统
KR20010050507A (ko) 자원 할당 방법, 시스템 및 저장 매체
JP2007193537A (ja) タグ情報管理プログラム、タグ情報管理方法およびタグ情報管理装置
EP3489776B1 (en) Control device, control method, and program
US20090112966A1 (en) Assignment of application modulesto deployment targets
CN101876954A (zh) 一种虚拟机控制系统及其工作方法
CN113544601B (zh) 控制系统、设定装置以及记录介质
WO2015036462A1 (en) Integration method and system
WO2022050090A1 (ja) コントロールシステム
US20230308510A1 (en) Dynamic storage sharing across network devices
WO2020075351A1 (ja) コントロール装置
WO2022025134A1 (ja) コントロールシステム
JP2011221634A (ja) 計算機システム、論理区画管理方法及び論理分割処理プログラム
JP5464027B2 (ja) ネットワークパラメータの自動設定プログラム、及びプログラマブルコントローラの周辺装置
JP6863305B2 (ja) ネットワークシステム、制御方法および制御装置
US20210044449A1 (en) Control system and control method
JP2001306284A (ja) サーバ装置およびクライアント装置およびデバイス検索方法および記憶媒体
KR102033330B1 (ko) 항공전자 통신 모듈 및 이의 동작 방법
US11294732B2 (en) Self-partitioning distributed computing system
CN113918273B (zh) 一种容器组的创建方法和装置
CN117251297B (zh) 一种设备分配方法及电子设备和存储介质

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022546232

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21864148

Country of ref document: EP

Kind code of ref document: A1