WO2018074590A1 - コントローラ - Google Patents

コントローラ Download PDF

Info

Publication number
WO2018074590A1
WO2018074590A1 PCT/JP2017/038015 JP2017038015W WO2018074590A1 WO 2018074590 A1 WO2018074590 A1 WO 2018074590A1 JP 2017038015 W JP2017038015 W JP 2017038015W WO 2018074590 A1 WO2018074590 A1 WO 2018074590A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
memory
control
cpu core
executes
Prior art date
Application number
PCT/JP2017/038015
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 CN201780038687.XA priority Critical patent/CN109313426B/zh
Priority to US16/332,215 priority patent/US20190302724A1/en
Priority to JP2018545772A priority patent/JP6626216B2/ja
Publication of WO2018074590A1 publication Critical patent/WO2018074590A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7839Architectures of general purpose stored program computers comprising a single central processing unit with memory
    • G06F15/7842Architectures of general purpose stored program computers comprising a single central processing unit with memory on one IC chip (single chip microcontrollers)
    • G06F15/7853Architectures of general purpose stored program computers comprising a single central processing unit with memory on one IC chip (single chip microcontrollers) including a ROM
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1105I-O

Definitions

  • Embodiments of the present invention relate to a controller.
  • a control system designed to improve the processing capacity of industrial control devices by controlling the control target devices with a plurality of control devices via an input / output device capable of inputting / outputting data to / from the control target devices.
  • a plurality of control devices and input / output devices can communicate with each other via a bus.
  • a plurality of control devices can access data input / output to / from the control target device at an arbitrary timing, and there are restrictions on the timing of accessing the data. Not provided. For this reason, a plurality of control devices access data stored in the input / output device at individual timings. When access to the data by a plurality of control devices is performed at the same timing, access to the data is performed. There may be a collision of the indicated signal.
  • the controller of the embodiment includes a memory and a processor.
  • the processor controls an external device to be controlled.
  • the processor includes a controller function core and a computer function core.
  • the controller function core reads I / O data received from the control target device from the I / O memory in the storage area of the memory, and stores a part of the read I / O data in the storage area. Is stored in a shared memory different from the I / O memory, and a ladder application that stores control data to be transmitted to the control target device in the I / O memory is executed.
  • the computer function core is a core different from the controller function core, and executes a computer application that reads I / O data from the shared memory.
  • FIG. 1 is a diagram illustrating an example of a configuration of a PLC that executes a soft PLC according to the first embodiment.
  • FIG. 2 is a diagram for explaining an example of a transfer process of control data and I / O data in the PLC according to the first embodiment.
  • FIG. 3 is a diagram for explaining an example of control data transfer processing in the PLC according to the second embodiment.
  • FIG. 4 is a diagram illustrating an example of the configuration of the PLC according to the third embodiment.
  • FIG. 5 is a diagram for explaining an example of I / O data transfer processing in the PLC according to the third embodiment.
  • FIG. 6 is a diagram illustrating an example of a configuration of a PLC according to the fourth embodiment.
  • FIG. 1 is a diagram illustrating an example of a configuration of a PLC that executes a soft PLC according to the first embodiment.
  • a software PLC Programmable Logic Controller
  • the PLC is a communication I / O such as a network card that enables communication between a processor 1 such as a CPU (Central Processing Unit) having a plurality of cores, a main memory 2, and a control target device 3. F7.
  • a processor 1 such as a CPU (Central Processing Unit) having a plurality of cores, a main memory 2, and a control target device 3.
  • the main memory 2 (an example of a memory) includes an I / O memory 201 (an example of a first storage area) and a shared memory 202 (an example of a second storage area) different from the I / O memory 201.
  • the processor 1 is a multi-core processor that has a plurality of CPU (Central Processing Unit) cores and controls the control target device 3 by executing software on the CPU cores. Specifically, the processor 1 operates a plurality of containers isolated from each other by one OS (Operating System) executed by any one of the plurality of CPU cores. At that time, the processor 1 executes each container in a different CPU core.
  • the processor 1 includes a controller function CPU core 101, a computer function CPU core 102, and an I / O management CPU core 103 as CPU cores for executing containers.
  • the I / O management CPU core 103 executes a container including a communication application.
  • the communication application transmits control data transmitted to the control target device 3 between the control target device 3 (an example of a first control target device) and the I / O memory 201 via the I / O bus 4.
  • I / O data received from the control target device 3 is transferred.
  • the communication application stores the I / O data in the I / O memory 201 and transmits the control data stored in the I / O memory 201 to the control target device 3.
  • the control data includes alarm data indicating that an abnormality has been detected in a control instruction or I / O data for the control target device 3.
  • the I / O data is so-called raw data including a control result of the control target device 3.
  • the I / O management CPU core 103 includes an I / O buffer 103a that temporarily stores control data and I / O data transferred between the control target device 3 and the I / O memory 201.
  • the communication application uses the I / O memory map stored in the main memory 2 to save and read control data, I / O data, and the like with respect to the I / O memory 201.
  • the I / O memory map indicates addresses of areas in the storage area of the I / O memory 201 that store control data, I / O data, and the like.
  • Controller function CPU core 101 executes a container including a ladder application.
  • the ladder application is a program for performing processing according to a described logic circuit, for example, and transfers I / O data between the I / O memory 201 and the shared memory 202.
  • the ladder application reads I / O data from the I / O memory 201 and shares a part of the read I / O data (hereinafter referred to as I / O partial data).
  • the data is stored in the memory 202 and the control data is stored in the I / O memory 201.
  • the ladder application extracts I / O partial data required for executing a computer application described later from I / O data read from the I / O memory 201.
  • the ladder application stores at least the extracted I / O partial data in the shared memory 202.
  • the ladder application extracts a part of bits included in the I / O data read from the I / O memory 201 as the I / O partial data and saves it in the shared memory 202.
  • the ladder application may be stored in the shared memory 202 after performing statistical processing and A / D conversion on the I / O partial data stored in the shared memory 202.
  • the ladder application compares the value indicated by the I / O partial data with a preset threshold value for each piece of I / O partial data stored in the shared memory 202, and Detect abnormalities in partial data.
  • the ladder application detects an abnormality in the I / O partial data
  • the ladder application can also add alarm data to the I / O partial data and save it in the shared memory 202.
  • the ladder application uses the I / O memory map stored in the main memory 2 to read I / O data from the I / O memory 201 and control the I / O memory 201. Save the data. Further, the ladder application stores I / O partial data in the shared memory 202 using the shared memory map stored in the main memory 2.
  • the shared memory map indicates an address of an area for storing I / O partial data and the like in the storage area of the shared memory 202.
  • the ladder application executed by the controller function CPU core 101 is for I / O data transferred between the I / O memory 201 and the shared memory 202, that is, I / O partial data stored in the shared memory 202. Then, processing such as data check (an example of first processing) is executed. As a result, the I / O partial data stored in the shared memory 202 can be processed as normal data, and it is possible to eliminate the need to perform data check again in the computer function CPU core 102 described later.
  • the computer function CPU core 102 executes a container including a computer application.
  • the computer function CPU core 102 realizes a virtual machine on the OS executed in the processor 1, executes a general-purpose OS on the virtual machine, and operates a computer application by the general-purpose OS.
  • the computer application reads the I / O partial data from the shared memory 202. That is, the computer application does not access I / O data stored in the I / O memory 201.
  • the computer application can also store control data in the shared memory 202. In this case, the ladder application described above reads the control data from the shared memory 202 and stores the read control data in the I / O memory 201.
  • the computer application uses the shared memory map stored in the main memory 2 to read I / O partial data from the shared memory 202 and save control data in the shared memory 202.
  • the computer application executed in the computer function CPU core 102 includes a control unit that stores control data in the shared memory 202 and a display unit that the controller has I / O partial data stored in the shared memory 202.
  • a process (an example of the second process) such as a display process to be displayed is executed.
  • access to the I / O partial data stored in the shared memory 202 is performed by a plurality of applications operating on one OS, and thus the data is stored in the shared memory 202 by the plurality of applications.
  • the access timing for the I / O partial data can be controlled, and access conflicts for the I / O partial data stored in the shared memory 202 can be prevented.
  • controller function CPU core 101 and the computer function CPU core 102 can access the same I / O partial data, the controller function CPU core 101 and the computer function for the I / O partial data.
  • the controller function CPU core 101 and the computer function for the I / O partial data When the same processing is performed by the CPU core 102, the consistency of the result can be ensured.
  • each of the plurality of control devices needs to acquire I / O data from the control target device 3, and it is necessary to receive I / O data for the number of control devices. Since only one data needs to be transferred between the control target device 3 and the PLC, the number of I / O data transfers between the control target device 3 and the PLC can be reduced.
  • the controller function CPU core 101 and the computer function CPU core 102 access only data stored in the main memory 2. Therefore, compared with the case where the controller function CPU core 101 and the computer function CPU core 102 access the control target device 3, the time required for accessing the I / O data can be shortened. Further, since the container including the ladder application and the container including the computer application are executed in different CPU cores, the processing load on the computer function CPU core 102 fluctuates, causing a delay in the execution of the container including the computer application. However, the controller function CPU 102 can execute the ladder application without being affected by the load fluctuation.
  • FIG. 2 is a diagram for explaining an example of a transfer process of control data and I / O data in the PLC according to the first embodiment.
  • the I / O management CPU core 103 sends I / O data A, I / O data B, and I / O data C from the control target device 3 via the I / O bus 4. Receive. Then, the I / O management CPU core 103 executes the communication application, and converts the I / O data A, I / O data B, and I / O data C received from the control target device 3 into the I / O buffer. Write to 103a. Next, the I / O management CPU core 103 executes the communication application, and converts the I / O data A, I / O data B, and I / O data C written in the I / O buffer 103a into I / O data. Transfer (save) to the memory 201.
  • the controller function CPU core 101 writes (saves) I / O data A, I / O data B, and I / O data C to the I / O memory 201. ), The ladder application is executed, and the I / O data A, I / O data B, and I / O data C are read from the I / O memory 201. Further, the controller function CPU core 101 executes a ladder application to execute a partial data of the I / O data A (hereinafter referred to as I / O partial data A ′) and a partial data of the I / O data B.
  • I / O partial data A ′ a partial data of the I / O data A
  • I / O partial data B ′ (Hereinafter referred to as I / O partial data B ′) and a part of the I / O data C (hereinafter referred to as I / O partial data C ′) are stored in the shared memory 202.
  • the controller function CPU core 101 executes the ladder application to execute the data check and execute the I / O partial data A ′, the I / O partial data B ′, and the I / O partial data C ′. Transfer (save) to 202.
  • the computer function CPU core 102 executes a computer application, and from the shared memory 202, I / O partial data A ′, I / O partial data B ′, and I / O partial data C ′. And display processing of I / O partial data A ′, B ′, C ′ using the read I / O partial data A ′, I / O partial data B ′, and I / O partial data C ′.
  • the computer function CPU core 102 executes a computer application and writes (saves) the control data D to the shared memory 202.
  • the computer function CPU core 102 stores data including control instructions input by the user via the operation unit in the shared memory 202 as control data D.
  • the computer function CPU core 102 does not access the I / O data A, I / O data B, and I / O data C stored in the I / O memory 201.
  • the controller function CPU core 101 and the computer function CPU core 102 can execute processing on the same I / O partial data A ′, B ′, and C ′.
  • the controller function CPU core 101 and the computer function CPU core 102 consistency of the result can be ensured.
  • the I / O partial data A ′, B ′, and C ′ that have been subjected to data check by the controller function CPU core 101 are written in the shared memory 202.
  • the conventional system since a plurality of controllers exchange I / O data with the control target device 3 via the input / output device, it is necessary to exchange I / O data corresponding to the number of controllers. , Access to the control target device 3 increases.
  • the I / O management CPU core 103 exchanges the control target device 3 with the I / O data A, B, C, so that the control target device 3 and the PLC
  • the number of transfers of I / O data A, B, and C can be reduced.
  • the controller function CPU core 101 and the computer function CPU core 102 since the controller function CPU core 101 and the computer function CPU core 102 only access data stored in the main memory 2, the controller function CPU core 101 and the computer function CPU core 102 access the control target device 3. Compared to the case, the time required for accessing the I / O data A, B, and C can be shortened.
  • the controller function CPU core 101 executes the ladder application and executes the control data D. And execute data check. Then, the controller function CPU core 101 executes the ladder application and writes (saves) the control data D for which the data check has been performed to the I / O memory 201.
  • the I / O management CPU core 103 executes the communication application to execute the control data. D is read and written to the I / O buffer 103a. Then, the I / O management CPU core 103 executes the communication application and transmits the control data D written in the I / O buffer 103 a to the control target device 3 via the I / O bus 4. .
  • access to the I / O partial data stored in the shared memory 202 is performed by a plurality of applications operated by one OS.
  • the access timing to the I / O partial data stored in the shared memory 202 can be controlled, and the access conflict to the I / O partial data stored in the shared memory 202 can be prevented.
  • the controller function CPU core 101 and the computer function CPU core 102 access the same I / O partial data, the controller function CPU core 101 and the computer function CPU core 102 have the same I / O partial data.
  • the controller function core stores control data in the shared memory instead of storing the control data in the I / O memory, and the computer function CPU core stores the control data in the shared memory. It is an example which executes the program which operate
  • FIG. 3 is a diagram for explaining an example of control data transfer processing in the PLC according to the second embodiment.
  • the configuration of the PLC according to the present embodiment is the same as the configuration of the PLC according to the first embodiment.
  • the PLC when the PLC is not connected to the control target device 3 or before executing the control of the control target device 3, the PLC functions the computer function CPU core 302 as a simulator of the control target device 3.
  • the controller function CPU core 301 transitions to the simulation mode when the PLC is not connected to the control target device 3 or before the control of the control target device 3 is executed. Then, the controller function CPU core 301 writes the control data D to be transferred to the control target device 3 in the shared memory 202 instead of the I / O memory 201.
  • the computer function CPU core 302 executes a program (hereinafter referred to as a simulation program) that operates as a simulator of the control target device 3 in accordance with control data D (an example of predetermined data) stored in the shared memory 202. Then, the computer function CPU core 302 writes the simulation data SD, which is the execution result of the simulation program, into the shared memory 202.
  • a simulation program a program that operates as a simulator of the control target device 3 in accordance with control data D (an example of predetermined data) stored in the shared memory 202. Then, the computer function CPU core 302 writes the simulation data SD, which is the execution result of the simulation program, into the shared memory 202.
  • the controller function CPU core 301 reads the simulation data SD written in the shared memory 202, and determines whether or not the ladder application is normally executed based on the execution result of the simulation program indicated by the simulation data SD. To do. Thereby, it is possible to determine whether or not the ladder application is normally executed before executing the control of the control target device 3, so that the control target device 3 can be prevented from being erroneously controlled.
  • the present embodiment is an example in which a PLC processor has an I / O memory, a controller function CPU core, and a computer function CPU core for each control target device.
  • a PLC processor has an I / O memory, a controller function CPU core, and a computer function CPU core for each control target device.
  • FIG. 4 is a diagram illustrating an example of the configuration of the PLC according to the third embodiment.
  • the PLC processor 400 includes a controller function CPU core 401 (fifth core). Example), a computer function CPU core 402 (an example of the sixth core), an I / O management CPU core 403 (an example of the fourth core), and communication such as a network card that enables communication with the control target device 5 I / F 406 is included.
  • the main memory 7 has an I / O memory 404 (an example of a third storage area) different from the I / O memory 201 and the shared memory 405.
  • the I / O management CPU core 403 executes a container including a communication application.
  • the communication application transmits control data and I / O between the control target device 5 (an example of a second control target device) different from the control target device 3 and the I / O memory 404 via the I / O bus 6.
  • O data (an example of second data) is transferred.
  • the communication application stores I / O data received from the control target device 5 in the I / O memory 404 and transmits control data stored in the I / O memory 404 to the control target device 5.
  • the I / O management CPU core 403 includes an I / O buffer 403 a that temporarily stores control data and I / O data transferred between the control target device 5 and the I / O memory 404.
  • Controller function CPU core 401 executes a container including a ladder application.
  • the ladder application transfers I / O data between the I / O memory 404 and the shared memory 405.
  • the ladder application reads I / O data from the I / O memory 404, stores a part of the read I / O data in the shared memory 202, and Control data is stored in the I / O memory 404.
  • the ladder application executed by the controller function CPU core 401 includes I / O partial data transferred between the I / O memory 404 and the shared memory 405, that is, I / O partial data stored in the shared memory 405.
  • processing such as data check is executed.
  • the computer function CPU core 402 executes a container including a computer application.
  • the computer function CPU core 402 realizes a virtual machine on the OS executed in the processor 1, executes a general-purpose OS on the virtual machine, and the general-purpose OS Run computer applications.
  • the computer application reads I / O partial data from the shared memory 405. That is, the computer application executed by the computer function CPU cores 102 and 402 does not access the I / O data stored in the I / O memories 201 and 404.
  • the computer application executed in the computer function CPU core 402 displays control processing for storing control data in the shared memory 405 and I / O partial data stored in the shared memory 405 on a display unit included in the controller.
  • Execute processing such as processing.
  • the controller function CPU cores 101 and 401, the computer function CPU cores 102 and 402, and the I / O management CPU cores 103 and 403 Access to I / O partial data stored in the shared memory 405 is performed by a plurality of applications operating on one OS. Therefore, access to I / O partial data stored in the shared memory 405 by the plurality of applications is performed. Can be controlled, and access conflicts with respect to the I / O partial data stored in the shared memory 405 can be prevented.
  • controller function CPU cores 101 and 401 and the computer function CPU cores 102 and 402 can access the same I / O partial data, the controller function CPU core for the I / O partial data.
  • the same processing is performed by the CPUs 101 and 401 and the computer function CPU cores 102 and 402
  • the consistency of the results can be ensured.
  • it is sufficient to transfer one data between the control target devices 3 and 5 and the PLC the number of I / O data transfers between the control target devices 3 and 5 and the PLC can be reduced. .
  • FIG. 5 is a diagram for explaining an example of transfer processing of control data and I / O data in the PLC according to the third embodiment.
  • the I / O management CPU core 103 receives I / O data A from the control target device 3 via the I / O bus 4. Then, the I / O management CPU core 103 executes the communication application and writes the I / O data A received from the control target device 3 to the I / O buffer 103a. Next, the I / O management CPU core 103 executes the communication application and transfers (saves) the I / O data A written in the I / O buffer 103 a to the I / O memory 201.
  • the controller function CPU core 101 executes a ladder application and executes the I / O memory
  • the I / O data A is read from 201.
  • the controller function CPU 101 executes a ladder application and stores a part of the I / O data A ′ of the I / O data A in the shared memory 405.
  • the controller function CPU core 101 executes the ladder application and transfers (saves) the I / O partial data A ′ for which the data check has been performed to the shared memory 405.
  • the I / O management CPU core 403 receives I / O data B from the control target device 5 via the I / O bus 6. Then, the I / O management CPU core 403 executes the communication application and writes the I / O data B received from the control target device 5 to the I / O buffer 403a. Next, the I / O management CPU core 403 executes the communication application and transfers (saves) the I / O data B written in the I / O buffer 403 a to the I / O memory 404.
  • the controller function CPU core 401 executes the ladder application and executes the I / O memory. From 404, the I / O data B is read. Further, the controller function CPU core 401 executes the ladder application and stores a part of the I / O data B ′ of the I / O data B in the shared memory 405. Then, the controller function CPU core 401 executes the ladder application, and transfers (saves) the I / O partial data B ′ subjected to the data check to the shared memory 405.
  • the computer function CPU cores 102 and 402 execute the computer application from the shared memory 405 to read out the I / O partial data A ′ and the I / O partial data B ′, and read them out. Using the I / O partial data A ′ and the I / O partial data B ′, display processing of the I / O partial data A ′ and B ′ is executed. Further, the computer function CPU cores 102 and 402 execute the computer application and write (save) the control data D in the shared memory 405.
  • the computer function CPU cores 102 and 402 do not access the I / O data A and I / O data B stored in the I / O memories 201 and 404.
  • the controller function CPU cores 101 and 401 and the computer function CPU cores 102 and 402 can execute processing on the same I / O partial data A ′ and B ′.
  • a ′ and B ′ are subjected to the same processing by the controller function CPU cores 101 and 401 and the computer function CPU cores 102 and 402, the consistency of the results can be ensured.
  • the computer function CPU cores 102 and 402 perform control. Prior to processing and display processing, it is not necessary to perform data check on the I / O partial data A ′ and B ′. Furthermore, in the conventional system, since multiple controllers exchange I / O data with the control target devices 3 and 5 via the input / output device, it is necessary to exchange I / O data for the number of controllers. Thus, access to the control target devices 3 and 5 increases.
  • the I / O management CPU cores 103 and 403 exchange the I / O data A and B with the control target devices 3 and 5, so that the control target devices 3 and 5 and the PLC
  • the number of I / O data A and B transfers between the two can be reduced.
  • the controller function CPU cores 101 and 401 and the computer function CPU cores 102 and 402 access only the data stored in the main memory 2, the controller function CPU cores 101 and 401 and the computer function CPU cores 102 and 402 Compared with the case where the controlled devices 3 and 5 are accessed, the time required for accessing the I / O data A and B can be shortened.
  • the controller function CPU core 101 executes the ladder application and executes the control data Data D is read and data check is executed. Then, the controller function CPU core 101 executes the ladder application and writes (saves) the control data D for which the data check has been performed to the I / O memory 201.
  • the I / O management CPU core 103 executes the communication application and executes the control data. D is read and written to the I / O buffer 103a. Then, the I / O management CPU core 103 executes the communication application and transmits the control data D written in the I / O buffer 103 a to the control target device 3 via the I / O bus 4. .
  • the controller function CPU core 401 executes the ladder application to execute the control data D. And execute data check. Then, the controller function CPU core 401 executes the ladder application and writes (saves) the control data D for which the data check has been performed to the I / O memory 404.
  • the I / O management CPU core 403 executes the communication application and executes the control data. D is read and written to the I / O buffer 403a. Then, the I / O management CPU core 403 executes the communication application and transmits the control data D written in the I / O buffer 403 a to the control target device 5 via the I / O bus 6. .
  • the CPU cores 103 and 403 for I / O management are provided, access to the I / O partial data stored in the shared memory 405 is performed by a plurality of applications that are operated by one OS.
  • the access timing for the I / O partial data stored in the shared memory 405 can be controlled, and access conflicts for the I / O partial data stored in the shared memory 405 can be prevented.
  • controller function CPU cores 101 and 401 and the computer function CPU cores 102 and 402 access the same I / O partial data
  • the controller function CPU cores 101 and 401 and the computer are connected to the I / O partial data.
  • the software PLC has I / O memories 201 and 404, controller function CPU cores 101 and 401, computer function CPU cores 102 and 402, and I / O management for each of the two control target devices 3 and 5.
  • the I / O memory, the controller function CPU core, the computer function CPU core, And an I / O management CPU core when there are three or more control target devices, the I / O memory, the controller function CPU core, the computer function CPU core, And an I / O management CPU core.
  • FIG. 6 is a diagram illustrating an example of the configuration of the PLC according to the fourth embodiment.
  • the PLC according to the present embodiment includes a processor 600, a main memory 2, and a communication I / F 7.
  • the processor 600 includes a controller function CPU core 601 and a computer function CPU core 102 as CPU cores for executing a plurality of containers.
  • the controller function CPU core 601 executes a container including a communication application in place of the I / O management CPU 103 in the first embodiment. Thereby, if a multi-core processor having at least two CPU cores is used as the processor 600, the control target device 3 can be controlled.
  • access to the I / O partial data stored in the shared memories 202 and 405 is performed by a plurality of applications operating on one OS.
  • the timing of access to the I / O partial data stored in the shared memories 202 and 405 by a plurality of applications can be controlled, and access conflicts with respect to the I / O partial data stored in the shared memory 202 can be prevented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Programmable Controllers (AREA)
  • Multi Processors (AREA)

Abstract

実施形態のコントローラは、メモリと、プロセッサと、を備える。プロセッサは、外部の制御対象機器を制御する。また、プロセッサは、コントローラ機能コアと、コンピュータ機能コアと、を備える。コントローラ機能コアは、メモリが有する記憶領域のうちI/Oメモリから、制御対象機器から受信するI/Oデータを読み出し、読み出したI/Oデータのうち一部のI/Oデータを、記憶領域のうちI/Oメモリとは異なる共有メモリに保存し、制御対象機器に対して送信する制御用データをI/Oメモリに保存するラダーアプリケーションを実行する。コンピュータ機能コアは、コントローラ機能コアとは異なるコアであり、共有メモリからI/Oデータを読み出すコンピュータアプリケーションを実行する。

Description

コントローラ
 本発明の実施形態は、コントローラに関する。
 制御対象機器との間でデータを入出力可能な入出力装置を介して、複数の制御装置によって、制御対象機器を制御することによって、産業用の制御装置の処理能力の向上を図った制御システムがある。この制御システムでは、複数の制御装置および入出力装置が、バスを介して互いに通信可能である。
特開2001-229136号公報
 ところで、上述の制御システムでは、複数の制御装置が、入出力装置が制御対象機器との間で入出力するデータに対して任意のタイミングでアクセスでき、当該データに対してアクセスするタイミングについて制約が設けられていない。そのため、入出力装置が記憶するデータに対して、複数の制御装置が個別のタイミングでアクセスすることになり、複数の制御装置による当該データに対するアクセスが、同じタイミングで行われると、データに対するアクセスを指示する信号の衝突が発生する場合がある。
 また、入出力装置が記憶するデータに対して、複数の制御装置が同一の制御プログラムに従って処理を実行する場合、各制御装置によって当該データに対してアクセスするタイミングが異なると、同一の制御プログラムに従って当該データに対して処理を行ったとしても、その結果の整合性が確保されない場合がある。この場合、複数の制御装置が連携して制御対象機器を制御する場合に不都合が生じることがある。
 さらに、上述の制御システムでは、複数の制御装置が、同一の入出力装置を介して、制御対象機器との間でデータをやりとりする場合、制御装置の台数分のデータの転送が必要となり、入出力装置に対するアクセスが多くなる。特に、入出力装置に対するアクセスは、メモリに対するアクセスよりも長い時間を必要とすることが多いため、そのアクセスに時間がかかる。
 実施形態のコントローラは、メモリと、プロセッサと、を備える。プロセッサは、外部の制御対象機器を制御する。また、プロセッサは、コントローラ機能コアと、コンピュータ機能コアと、を備える。コントローラ機能コアは、メモリが有する記憶領域のうちI/Oメモリから、制御対象機器から受信するI/Oデータを読み出し、読み出したI/Oデータのうち一部のI/Oデータを、記憶領域のうちI/Oメモリとは異なる共有メモリに保存し、制御対象機器に対して送信する制御用データをI/Oメモリに保存するラダーアプリケーションを実行する。コンピュータ機能コアは、コントローラ機能コアとは異なるコアであり、共有メモリからI/Oデータを読み出すコンピュータアプリケーションを実行する。
図1は、第1の実施形態にかかるソフトPLCを実行するPLCの構成の一例を示す図である。 図2は、第1の実施形態にかかるPLC内における制御用データおよびI/Oデータの転送処理の一例を説明するための図である。 図3は、第2の実施形態にかかるPLC内における制御用データの転送処理の一例について説明するための図である。 図4は、第3の実施形態にかかるPLCの構成の一例を示す図である。 図5は、第3の実施形態にかかるPLC内におけるI/Oデータの転送処理の一例を説明するための図である。 図6は、第4の実施形態にかかるPLCの構成の一例を示す図である。
 以下、添付の図面を用いて、本実施形態にかかるコントローラについて説明する。
(第1の実施形態)
 図1は、第1の実施形態にかかるソフトPLCを実行するPLCの構成の一例を示す図である。本実施形態にかかるソフトPLC(Programmable Logic Controller)は、バルブやセンサ等の外部の制御対象機器3を制御するソフトウェアである。図1に示すように、PLCは、複数のコアを有するCPU(Central Processing Unit)等のプロセッサ1と、メインメモリ2と、制御対象機器3との通信を可能とするネットワークカード等の通信I/F7と、を有する。
 メインメモリ2(メモリの一例)は、I/Oメモリ201(第1記憶領域の一例)と、I/Oメモリ201とは異なる共有メモリ202(第2記憶領域の一例)と、を有する。プロセッサ1は、複数のCPU(Central Processing Unit)コアを有し、当該CPUコア上でソフトウェアを実行することによって、制御対象機器3を制御するマルチコアプロセッサである。具体的には、プロセッサ1は、複数のCPUコアのうちいずれかにより実行される1つのOS(Operating System)によって、互いに隔離された複数のコンテナを動作させる。その際、プロセッサ1は、各コンテナを異なるCPUコアにおいて実行する。本実施形態では、プロセッサ1は、コンテナを実行するCPUコアとして、コントローラ機能CPUコア101、コンピュータ機能CPUコア102、およびI/O管理用CPUコア103を有する。
 I/O管理用CPUコア103(第1コアの一例)は、通信アプリケーションを含むコンテナを実行する。通信アプリケーションは、I/Oバス4を介して、制御対象機器3(第1制御対象機器の一例)とI/Oメモリ201との間で、制御対象機器3に対して送信する制御用データおよび制御対象機器3から受信するI/Oデータ(第1データの一例)を転送する。言い換えると、通信アプリケーションは、I/OデータをI/Oメモリ201へ保存し、かつI/Oメモリ201に記憶される制御用データを制御対象機器3に送信する。本実施形態では、制御用データは、制御対象機器3に対する制御指示やI/Oデータに異常が検出されたことを示すアラームデータを含む。I/Oデータは、制御対象機器3の制御結果を含む、所謂、生データである。また、I/O管理用CPUコア103は、制御対象機器3とI/Oメモリ201との間で転送する制御用データおよびI/Oデータを一時的に記憶するI/Oバッファ103aを有する。本実施形態では、通信アプリケーションは、メインメモリ2に記憶されるI/Oメモリマップを用いて、I/Oメモリ201に対する制御用データおよびI/Oデータ等の保存および読み出しを行う。ここで、I/Oメモリマップは、I/Oメモリ201の記憶領域のうち、制御用データおよびI/Oデータ等を記憶する領域のアドレスを示す。
 コントローラ機能CPUコア101(第2コアの一例)は、ラダーアプリケーションを含むコンテナを実行する。ラダーアプリケーションは、例えば、記述された論理回路に従って処理を行うためのプログラムであって、I/Oメモリ201と共有メモリ202との間でI/Oデータを転送する。言い換えると、ラダーアプリケーションは、I/Oメモリ201から、I/Oデータを読み出し、当該読み出したI/Oデータのうち一部のI/Oデータ(以下、I/O部分データと言う)を共有メモリ202に保存し、さらに、制御用データをI/Oメモリ201に保存する。本実施形態では、ラダーアプリケーションは、I/Oメモリ201から読み出したI/Oデータから、後述するコンピュータアプリケーションの実行に要するI/O部分データを抽出する。I/Oデータのうち一部のI/O部分データを抽出する手法は、周知の手法を問わず、どのような手法を用いても良い。そして、ラダーアプリケーションは、少なくとも、抽出したI/O部分データを、共有メモリ202に保存する。例えば、ラダーアプリケーションは、I/Oメモリ201から読み出したI/Oデータが含むビットのうち、コンピュータアプリケーションの実行に要する一部のビットをI/O部分データとして抽出して、共有メモリ202に保存する。また、本実施形態では、ラダーアプリケーションは、共有メモリ202に保存するI/O部分データに対して、統計処理やA/D変換を実行した上で、共有メモリ202に保存しても良い。また、本実施形態では、ラダーアプリケーションは、共有メモリ202に保存するI/O部分データ毎に、当該I/O部分データが示す値と、予め設定された閾値とを比較して、I/O部分データの異常を検出する。そして、ラダーアプリケーションは、I/O部分データの異常を検出した場合、I/O部分データに対して、アラームデータを付加して、共有メモリ202に保存することも可能である。また、本実施形態では、ラダーアプリケーションは、メインメモリ2に記憶されるI/Oメモリマップを用いて、I/Oメモリ201からのI/Oデータの読み出し、およびI/Oメモリ201に対する制御用データの保存を行う。また、ラダーアプリケーションは、メインメモリ2に記憶される共有メモリマップを用いて、共有メモリ202に対するI/O部分データの保存を行う。共有メモリマップは、共有メモリ202の記憶領域のうち、I/O部分データ等を記憶する領域のアドレスを示す。また、コントローラ機能CPUコア101が実行するラダーアプリケーションは、I/Oメモリ201と共有メモリ202との間で転送するI/Oデータ、すなわち、共有メモリ202に記憶されるI/O部分データに対して、データチェック等の処理(第1処理の一例)を実行する。これにより、共有メモリ202に記憶されるI/O部分データを、正常なデータとして処理することができ、後述するコンピュータ機能CPUコア102において、再度、データチェックを行う必要を無くすることができる。
 コンピュータ機能CPUコア102(第3コアの一例)は、コンピュータアプリケーションを含むコンテナを実行する。例えば、コンピュータ機能CPUコア102は、プロセッサ1において実行されるOS上に仮想マシンを実現し、当該仮想マシン上で汎用のOSを実行し、その汎用のOSによってコンピュータアプリケーションを動作させる。コンピュータアプリケーションは、共有メモリ202からI/O部分データを読み出す。すなわち、コンピュータアプリケーションは、I/Oメモリ201に記憶されるI/Oデータに対してアクセスしない。また、コンピュータアプリケーションは、共有メモリ202に対して制御用データを保存することも可能である。その場合、上述のラダーアプリケーションは、共有メモリ202から制御用データを読み出し、当該読み出した制御用データのI/Oメモリ201に保存する。本実施形態では、コンピュータアプリケーションは、メインメモリ2に記憶される共有メモリマップを用いて、共有メモリ202からのI/O部分データの読み出し、および共有メモリ202に対する制御用データの保存を行う。また、コンピュータ機能CPUコア102において実行されるコンピュータアプリケーションは、共有メモリ202に対して制御用データを保存する制御処理や、共有メモリ202に記憶されるI/O部分データを、コントローラが有する表示部に表示する表示処理等の処理(第2処理の一例)を実行する。
 以上の処理によれば、1つのOSにより動作する複数のアプリケーションによって、共有メモリ202に記憶されるI/O部分データに対するアクセスが行われるので、当該複数のアプリケーションによる、共有メモリ202に記憶されるI/O部分データに対するアクセスのタイミングが制御可能となり、共有メモリ202に記憶されるI/O部分データに対するアクセスの衝突を防止できる。
 また、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102が互いに同一のI/O部分データにアクセスすることが可能となるので、当該I/O部分データに対して、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102によって同一の処理を行った場合、その結果の整合性を確保できる。また、従来の制御システムでは、複数の制御装置それぞれが制御対象機器3からI/Oデータを取得する必要があり、制御装置の台数分のI/Oデータの受信が必要となっているが、制御対象機器3とPLCとの間で1つのデータを転送すれば済むので、制御対象機器3とPLCとの間でのI/Oデータの転送の回数を減らすことができる。さらに、PLCの内部では、I/O管理用CPUコア103のみが制御対象機器3へアクセスし、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102はメインメモリ2に記憶されるデータに対してのみアクセスするため、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102が、制御対象機器3にアクセスする場合と比較して、I/Oデータに対するアクセスに要する時間を短縮できる。また、ラダーアプリケーションを含むコンテナおよびコンピュータアプリケーションを含むコンテナがそれぞれ異なるCPUコアにおいて実行されるので、コンピュータ機能CPUコア102にかかる処理負荷が変動して、コンピュータアプリケーションを含むコンテナの実行に遅延が生じたとしても、コントローラ機能CPU102は負荷変動の影響を受けることなく、ラダーアプリケーションを実行できる。
 次に、図2を用いて、本実施形態にかかるPLC内における制御用データおよびI/Oデータの転送処理の一例について説明する。
 図2は、第1の実施形態にかかるPLC内における制御用データおよびI/Oデータの転送処理の一例を説明するための図である。
 図2に示すように、I/O管理用CPUコア103は、I/Oバス4を介して、制御対象機器3から、I/OデータA、I/OデータB、およびI/OデータCを受信する。そして、I/O管理用CPUコア103は、通信アプリケーションを実行して、制御対象機器3から受信したI/OデータA、I/OデータB、およびI/OデータCを、I/Oバッファ103aに書き込む。次いで、I/O管理用CPUコア103は、通信アプリケーションを実行して、I/Oバッファ103aに書き込んだI/OデータA、I/OデータB、およびI/OデータCを、I/Oメモリ201に転送(保存)する。
 図2に示すように、コントローラ機能CPUコア101は、I/Oメモリ201に対して、I/OデータA、I/OデータB、およびI/OデータCが書き込まれると(保存されると)、ラダーアプリケーションを実行して、I/Oメモリ201から、当該I/OデータA、I/OデータB、およびI/OデータCを読み出す。さらに、コントローラ機能CPUコア101は、ラダーアプリケーションを実行して、I/OデータAの一部のデータ(以下、I/O部分データA´と言う)、I/OデータBの一部のデータ(以下、I/O部分データB´と言う)、およびI/OデータCの一部のデータ(以下、I/O部分データC´と言う)を、共有メモリ202に保存する。その際、コントローラ機能CPUコア101は、ラダーアプリケーションを実行して、データチェックを実行したI/O部分データA´、I/O部分データB´、およびI/O部分データC´を、共有メモリ202に転送(保存)する。
 図2に示すように、コンピュータ機能CPUコア102は、コンピュータアプリケーションを実行して、共有メモリ202から、I/O部分データA´、I/O部分データB´、およびI/O部分データC´を読み出し、当該読み出したI/O部分データA´、I/O部分データB´、およびI/O部分データC´を用いて、I/O部分データA´,B´,C´の表示処理を実行する。また、コンピュータ機能CPUコア102は、コンピュータアプリケーションを実行して、制御用データDを、共有メモリ202に書き込む(保存する)。例えば、コンピュータ機能CPUコア102は、操作部を介してユーザにより入力される制御指示を含むデータを制御用データDとして共有メモリ202に保存する。
 このように、コンピュータ機能CPUコア102は、I/Oメモリ201に記憶されるI/OデータA、I/OデータB、およびI/OデータCに対してアクセスしない。これにより、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102が互いに同一のI/O部分データA´,B´,C´に処理を実行することが可能となるので、当該I/O部分データA´,B´,C´に対して、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102によって同一の処理を行った場合、その結果の整合性を確保できる。
 また、本実施形態では、コントローラ機能CPUコア101によってデータチェックが行われたI/O部分データA´,B´,C´が共有メモリ202に書き込まれるので、コンピュータ機能CPUコア102において、制御処理や表示処理に先立って、I/O部分データA´,B´,C´に対してデータチェックを行う必要が無くなる。さらに、従来のシステムにおいては、複数のコントローラが、入出力装置を介して、制御対象機器3とI/Oデータをやりとりするため、コントローラの数の分のI/Oデータのやりとりが必要とあり、制御対象機器3に対するアクセスが多くなる。これに対して、本実施形態では、I/O管理用CPUコア103のみが制御対象機器3とI/OデータA,B,Cをやりとりするので、制御対象機器3とPLCとの間でのI/OデータA,B,Cの転送の回数を減らすことができる。さらに、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102はメインメモリ2に記憶されるデータに対してのみアクセスするため、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102が、制御対象機器3にアクセスする場合と比較して、I/OデータA,B,Cに対するアクセスに要する時間を短縮できる。
 また、図2に示すように、コントローラ機能CPUコア101は、コンピュータ機能CPUコア102における制御処理によって制御用データDが共有メモリ202に書き込まれると、ラダーアプリケーションを実行して、当該制御用データDを読み出し、データチェックを実行する。そして、コントローラ機能CPUコア101は、ラダーアプリケーションを実行して、データチェックを実行した制御用データDを、I/Oメモリ201に書き込む(保存する)。
 また、図2に示すように、I/O管理用CPUコア103は、データチェックを実行した制御用データDがI/Oメモリ201に書き込まれると、通信アプリケーションを実行して、当該制御用データDを読み出し、I/Oバッファ103aに書き込む。そして、I/O管理用CPUコア103は、通信アプリケーションを実行して、I/Oバッファ103aに書き込まれた制御用データDを、I/Oバス4を介して、制御対象機器3に送信する。
 このように、第1の実施形態にかかるPLCによれば、1つのOSにより動作する複数のアプリケーションによって、共有メモリ202に記憶されるI/O部分データに対するアクセスが行われるので、当該複数のアプリケーションによる、共有メモリ202に記憶されるI/O部分データに対するアクセスのタイミングを制御可能となり、共有メモリ202に記憶されるI/O部分データに対するアクセスの衝突を防止できる。また、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102が互いに同一のI/O部分データにアクセスするので、当該I/O部分データに対して、コントローラ機能CPUコア101およびコンピュータ機能CPUコア102によって同一の処理を行った場合、その結果の整合性を確保できる。
(第2の実施形態)
 本実施形態は、コントローラ機能コアが、I/Oメモリに制御用データを保存する代わりに、共有メモリに対して制御用データを保存し、コンピュータ機能CPUコアが、共有メモリに記憶される制御用データに従って、制御対象機器のシミュレータとして動作するプログラムを実行する例である。
 図3は、第2の実施形態にかかるPLC内における制御用データの転送処理の一例について説明するための図である。本実施形態のPLCの構成は、第1の実施形態にかかるPLCの構成と同様である。本実施形態では、PLCは、制御対象機器3と接続されていない場合または制御対象機器3の制御を実行する前、ラダーアプリケーションを検証するために、コンピュータ機能CPUコア302を制御対象機器3のシミュレータとして利用する。
 具体的には、コントローラ機能CPUコア301は、PLCが制御対象機器3と接続されていない場合、若しくは制御対象機器3の制御を実行する前に、シミュレーションモードに遷移する。そして、コントローラ機能CPUコア301は、制御対象機器3に転送する制御用データDを、I/Oメモリ201の代わりに、共有メモリ202に書き込む。
 コンピュータ機能CPUコア302は、共有メモリ202に記憶される制御用データD(所定のデータの一例)に従って、制御対象機器3のシミュレータとして動作するプログラム(以下、シミュレーションプログラムと言う)を実行する。そして、コンピュータ機能CPUコア302は、シミュレーションプログラムの実行結果であるシミュレーションデータSDを、共有メモリ202に書き込む。
 次いで、コントローラ機能CPUコア301は、共有メモリ202に書き込まれたシミュレーションデータSDを読み出し、当該シミュレーションデータSDが示すシミュレーションプログラムの実行結果に基づいて、ラダーアプリケーションが正常に実行されているか否かを判断する。これにより、制御対象機器3の制御を実行する前に、ラダーアプリケーションが正常に実行されているか否かを判断できるので、制御対象機器3が誤って制御されることを防止できる。
(第3の実施形態)
 本実施形態は、PLCのプロセッサが、制御対象機器毎に、I/Oメモリ、コントローラ機能CPUコア、およびコンピュータ機能CPUコアを有する例である。以下の説明では、上述の実施形態と同様の箇所については説明を省略する。
 図4は、第3の実施形態にかかるPLCの構成の一例を示す図である。本実施形態にかかるPLCのプロセッサ400は、コントローラ機能CPUコア101、コンピュータ機能CPUコア102、I/O管理用CPUコア103、および通信I/F7に加えて、コントローラ機能CPUコア401(第5コアの一例)、コンピュータ機能CPUコア402(第6コアの一例)、I/O管理用CPUコア403(第4コアの一例)、および制御対象機器5との通信を可能とするネットワークカード等の通信I/F406を有する。また、メインメモリ7は、I/Oメモリ201および共有メモリ405に加えて、当該I/Oメモリ201および共有メモリ405とは異なるI/Oメモリ404(第3記憶領域の一例)を有する。
 I/O管理用CPUコア403は、通信アプリケーションを含むコンテナを実行する。通信アプリケーションは、I/Oバス6を介して、制御対象機器3とは異なる制御対象機器5(第2制御対象機器の一例)とI/Oメモリ404との間で、制御用データおよびI/Oデータ(第2データの一例)を転送する。言い換えると、通信アプリケーションは、制御対象機器5から受信するI/OデータをI/Oメモリ404へ保存し、かつI/Oメモリ404に記憶される制御用データを制御対象機器5へ送信する。また、I/O管理用CPUコア403は、制御対象機器5とI/Oメモリ404との間で転送する制御用データおよびI/Oデータを一時的に記憶するI/Oバッファ403aを有する。
 コントローラ機能CPUコア401は、ラダーアプリケーションを含むコンテナを実行する。ラダーアプリケーションは、I/Oメモリ404と共有メモリ405との間でI/Oデータを転送する。具体的には、ラダーアプリケーションは、I/Oメモリ404から、I/Oデータを読み出し、当該読み出したI/Oデータのうち一部のI/O部分データを共有メモリ202に保存し、さらに、制御用データをI/Oメモリ404に保存する。また、コントローラ機能CPUコア401が実行するラダーアプリケーションは、I/Oメモリ404と共有メモリ405との間で転送するI/O部分データ、すなわち、共有メモリ405に記憶されるI/O部分データに対して、データチェック等の処理を実行する。
 コンピュータ機能CPUコア402は、コンピュータアプリケーションを含むコンテナを実行する。例えば、コンピュータ機能CPUコア402は、コンピュータ機能CPUコア102と同様に、プロセッサ1において実行されるOS上に仮想マシンを実現し、当該仮想マシン上で汎用のOSを実行し、その汎用のOSによってコンピュータアプリケーションを動作させる。コンピュータアプリケーションは、共有メモリ405からI/O部分データを読み出す。すなわち、コンピュータ機能CPUコア102,402が実行するコンピュータアプリケーションは、I/Oメモリ201,404に記憶されるI/Oデータに対してアクセスしない。また、コンピュータ機能CPUコア402において実行されるコンピュータアプリケーションは、共有メモリ405に対して制御用データを保存する制御処理や共有メモリ405に記憶されるI/O部分データをコントローラが有する表示部に表示する処理等の処理を実行する。これにより、制御対象機器3,5毎に、I/Oメモリ404、コントローラ機能CPUコア101,401、コンピュータ機能CPUコア102,402、およびI/O管理用CPUコア103,403を有する場合も、1つのOSにより動作する複数のアプリケーションによって、共有メモリ405に記憶されるI/O部分データに対するアクセスが行われるので、当該複数のアプリケーションによる、共有メモリ405に記憶されるI/O部分データに対するアクセスのタイミングを制御可能となり、共有メモリ405に記憶されるI/O部分データに対するアクセスの衝突を防止できる。
 また、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402が互いに同一のI/O部分データにアクセスすることが可能となるので、当該I/O部分データに対して、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402によって同一の処理を行った場合、その結果の整合性を確保できる。また、制御対象機器3,5とPLCとの間で1つのデータを転送すれば済むので、制御対象機器3,5とPLCとの間でのI/Oデータの転送の回数を減らすことができる。
 次に、図5を用いて、本実施形態にかかるPLC内における制御用データおよびI/Oデータの転送処理の一例について説明する。
 図5は、第3の実施形態にかかるPLC内における制御用データおよびI/Oデータの転送処理の一例を説明するための図である。
 図5に示すように、I/O管理用CPUコア103は、I/Oバス4を介して、制御対象機器3から、I/OデータAを受信する。そして、I/O管理用CPUコア103は、通信アプリケーションを実行して、制御対象機器3から受信したI/OデータAをI/Oバッファ103aに書き込む。次いで、I/O管理用CPUコア103は、通信アプリケーションを実行して、I/Oバッファ103aに書き込んだI/OデータAを、I/Oメモリ201に転送(保存)する。
 図5に示すように、コントローラ機能CPUコア101は、I/Oメモリ201に対して、I/OデータAが書き込まれると(保存されると)、ラダーアプリケーションを実行して、I/Oメモリ201から、当該I/OデータAを読み出す。さらに、コントローラ機能CPU101は、ラダーアプリケーションを実行して、I/OデータAの一部のI/O部分データA´を、共有メモリ405に保存する。その際、コントローラ機能CPUコア101は、ラダーアプリケーションを実行して、データチェックを実行したI/O部分データA´を、共有メモリ405に転送(保存)する。
 一方、図5に示すように、I/O管理用CPUコア403は、I/Oバス6を介して、制御対象機器5から、I/OデータBを受信する。そして、I/O管理用CPUコア403は、通信アプリケーションを実行して、制御対象機器5から受信したI/OデータBをI/Oバッファ403aに書き込む。次いで、I/O管理用CPUコア403は、通信アプリケーションを実行して、I/Oバッファ403aに書き込んだI/OデータBを、I/Oメモリ404に転送(保存)する。
 図5に示すように、コントローラ機能CPUコア401は、I/Oメモリ404に対して、I/OデータBが書き込まれると(保存されると)、ラダーアプリケーションを実行して、I/Oメモリ404から、当該I/OデータBを読み出す。さらに、コントローラ機能CPUコア401は、ラダーアプリケーションを実行して、I/OデータBの一部のI/O部分データB´を共有メモリ405に保存する。そして、コントローラ機能CPUコア401は、ラダーアプリケーションを実行して、データチェックを実行したI/O部分データB´を、共有メモリ405に転送(保存)する。
 また、図5に示すように、コンピュータ機能CPUコア102,402は、共有メモリ405から、コンピュータアプリケーションを実行して、I/O部分データA´およびI/O部分データB´を読み出し、当該読み出したI/O部分データA´およびI/O部分データB´を用いて、I/O部分データA´,B´の表示処理を実行する。また、コンピュータ機能CPUコア102,402は、コンピュータアプリケーションを実行して、制御用データDを、共有メモリ405に書き込む(保存する)。
 このように、コンピュータ機能CPUコア102,402は、I/Oメモリ201,404に記憶されるI/OデータAおよびI/OデータBに対してアクセスしない。これにより、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402が互いに同一のI/O部分データA´,B´に処理を実行することが可能となるので、当該I/O部分データA´,B´に対して、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402によって同一の処理を行った場合、その結果の整合性を確保できる。
 また、本実施形態では、コントローラ機能CPUコア101,401によってデータチェックが行われたI/O部分データA´,B´が共有メモリ405に書き込まれるので、コンピュータ機能CPUコア102,402において、制御処理や表示処理に先立って、I/O部分データA´,B´に対してデータチェックを行う必要が無くなる。さらに、従来のシステムにおいては、複数のコントローラが、入出力装置を介して、制御対象機器3,5とI/Oデータをやりとりするため、コントローラの数の分のI/Oデータのやりとりが必要となり、制御対象機器3,5に対するアクセスが多くなる。これに対して、本実施形態では、I/O管理用CPUコア103,403のみが制御対象機器3,5とI/OデータA,Bをやりとりするので、制御対象機器3,5とPLCとの間でのI/OデータA,Bの転送の回数を減らすことができる。さらに、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402はメインメモリ2に記憶されるデータに対してのみアクセスするため、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402が、制御対象機器3,5にアクセスする場合と比較して、I/OデータA,Bに対するアクセスに要する時間を短縮できる。
 また、図5に示すように、コントローラ機能CPUコア101は、コンピュータ機能CPUコア102,402における制御処理によって制御用データDが共有メモリ405に書き込まれると、ラダーアプリケーションを実行して、当該制御用データDを読み出し、データチェックを実行する。そして、コントローラ機能CPUコア101は、ラダーアプリケーションを実行して、データチェックを実行した制御用データDを、I/Oメモリ201に書き込む(保存する)。
 また、図5に示すように、I/O管理用CPUコア103は、データチェックを実行した制御用データDがI/Oメモリ201に書き込まれると、通信アプリケーションを実行して、当該制御用データDを読み出し、I/Oバッファ103aに書き込む。そして、I/O管理用CPUコア103は、通信アプリケーションを実行して、I/Oバッファ103aに書き込まれた制御用データDを、I/Oバス4を介して、制御対象機器3に送信する。
 また、図5に示すように、コントローラ機能CPUコア401は、コンピュータ機能CPU102,402における制御処理によって制御用データDが共有メモリ405に書き込まれると、ラダーアプリケーションを実行して、当該制御用データDを読み出し、データチェックを実行する。そして、コントローラ機能CPUコア401は、ラダーアプリケーションを実行して、データチェックを実行した制御用データDを、I/Oメモリ404に書き込む(保存する)。
 また、図5に示すように、I/O管理用CPUコア403は、データチェックを実行した制御用データDがI/Oメモリ404に書き込まれると、通信アプリケーションを実行して、当該制御用データDを読み出し、I/Oバッファ403aに書き込む。そして、I/O管理用CPUコア403は、通信アプリケーションを実行して、I/Oバッファ403aに書き込まれた制御用データDを、I/Oバス6を介して、制御対象機器5に送信する。
 このように、第3の実施形態にかかるPLCによれば、制御対象機器3,5毎に、I/Oメモリ201,404、コントローラ機能CPUコア101,401、コンピュータ機能CPUコア102,402、およびI/O管理用CPUコア103,403を有する場合も、1つのOSにより動作する複数のアプリケーションによって、共有メモリ405に記憶されるI/O部分データに対するアクセスが行われるので、当該複数のアプリケーションによる、共有メモリ405に記憶されるI/O部分データに対するアクセスのタイミングを制御可能となり、共有メモリ405に記憶されるI/O部分データに対するアクセスの衝突を防止できる。また、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402が互いに同一のI/O部分データにアクセスするので、当該I/O部分データに対して、コントローラ機能CPUコア101,401およびコンピュータ機能CPUコア102,402によって同一の処理を行った場合、その結果の整合性を確保できる。
 本実施形態では、ソフトPLCは、2台の制御対象機器3,5毎に、I/Oメモリ201,404、コントローラ機能CPUコア101,401、コンピュータ機能CPUコア102,402、およびI/O管理用CPUコア103,403を有しているが、3台以上の制御対象機器が存在する場合も、同様に、制御対象機器毎に、I/Oメモリ、コントローラ機能CPUコア、コンピュータ機能CPUコア、およびI/O管理用CPUコアが設けられるものとする。
(第4の実施形態)
 本実施形態は、コントローラ機能CPUコアが、通信アプリケーションを実行する例である。以下の説明では、第1の実施形態と同様の構成については説明を省略する。
 図6は、第4の実施形態にかかるPLCの構成の一例を示す図である。本実施形態にかかるPLCは、図6に示すように、プロセッサ600と、メインメモリ2と、通信I/F7と、を有する。プロセッサ600は、複数のコンテナを実行するCPUコアとして、コントローラ機能CPUコア601、およびコンピュータ機能CPUコア102を有する。
 コントローラ機能CPUコア601は、第1の実施形態におけるI/O管理用CPU103に代わって、通信アプリケーションを含むコンテナを実行する。これにより、少なくとも2つのCPUコアを有するマルチコアプロセッサをプロセッサ600として用いれば、制御対象機器3を制御することができる。
 このように、第4の実施形態にかかるPLCによれば、通信アプリケーションを実行する専用のCPUコアを有していない場合であっても、上述の実施形態と同様の作用効果を得ることができる。
 以上説明したとおり、第1から第4の実施形態によれば、1つのOSにより動作する複数のアプリケーションによって、共有メモリ202,405に記憶されるI/O部分データに対するアクセスが行われるので、当該複数のアプリケーションによる、共有メモリ202,405に記憶されるI/O部分データに対するアクセスのタイミングを制御可能となり、共有メモリ202に記憶されるI/O部分データに対するアクセスの衝突を防止できる。
 本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、請求の範囲に記載された発明とその均等の範囲に含まれる。

Claims (4)

  1.  メモリと、
     外部の制御対象機器を制御するプロセッサと、を備え、
     前記プロセッサは、
     前記メモリが有する記憶領域のうちI/Oメモリから、前記制御対象機器から受信するI/Oデータを読み出し、前記読み出したI/Oデータのうち一部の前記I/Oデータを、前記記憶領域のうち前記I/Oメモリとは異なる共有メモリに保存し、前記制御対象機器に対して送信する制御用データを前記I/Oメモリに保存するラダーアプリケーションを実行するコントローラ機能コアと、
     前記コントローラ機能コアとは異なるコアであり、前記共有メモリから前記I/Oデータを読み出すコンピュータアプリケーションを実行するコンピュータ機能コアと、
     を備えるコントローラ。
  2.  前記コントローラ機能コアは、さらに、前記制御対象機器から受信する前記I/Oデータの前記I/Oメモリへの保存、および前記I/Oメモリに記憶される前記制御用データの前記制御対象機器への送信を実行するI/Oアプリケーションを実行する請求項1に記載のコントローラ。
  3.  前記コントローラ機能コアは、前記制御用データを前記共有メモリに保存し、
     前記コンピュータ機能コアは、さらに、前記共有メモリに記憶される前記制御用データに従って、前記制御対象機器のシミュレータとして動作するプログラムを実行し、当該プログラムの実行結果を前記共有メモリに保存する請求項1または2に記載のコントローラ。
  4.  前記プロセッサは、前記制御対象機器毎に、前記I/Oメモリ、前記コントローラ機能コア、および前記コンピュータ機能コアを備える請求項1から3のいずれか一に記載のコントローラ。
PCT/JP2017/038015 2016-10-21 2017-10-20 コントローラ WO2018074590A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201780038687.XA CN109313426B (zh) 2016-10-21 2017-10-20 控制器
US16/332,215 US20190302724A1 (en) 2016-10-21 2017-10-20 Controller
JP2018545772A JP6626216B2 (ja) 2016-10-21 2017-10-20 コントローラ

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016-207220 2016-10-21
JP2016207220 2016-10-21

Publications (1)

Publication Number Publication Date
WO2018074590A1 true WO2018074590A1 (ja) 2018-04-26

Family

ID=62018816

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/038015 WO2018074590A1 (ja) 2016-10-21 2017-10-20 コントローラ

Country Status (4)

Country Link
US (1) US20190302724A1 (ja)
JP (1) JP6626216B2 (ja)
CN (1) CN109313426B (ja)
WO (1) WO2018074590A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09198360A (ja) * 1996-01-18 1997-07-31 Shimadzu Corp プロセス制御装置
JP2001042905A (ja) * 1999-07-27 2001-02-16 Matsushita Electric Works Ltd プログラマブルコントローラ
JP2005292912A (ja) * 2004-03-31 2005-10-20 Yokogawa Electric Corp シミュレーション装置
US20130018507A1 (en) * 2011-07-13 2013-01-17 Kuka Roboter Gmbh Control System Of A Robot
JP2015076065A (ja) * 2013-10-11 2015-04-20 Mywayプラス株式会社 電力機器の制御装置、制御システム、制御方法および制御プログラム

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5112003B2 (ja) * 2007-10-19 2013-01-09 株式会社日立製作所 ストレージ装置及びこれを用いたデータ格納方法
JP2012155519A (ja) * 2011-01-26 2012-08-16 Renesas Electronics Corp シミュレーション装置、シミュレーション方法およびそのコンピュータ・プログラム
US9311460B2 (en) * 2011-03-15 2016-04-12 Omron Corporation Programmable controller system, tool device, tool program, storage medium, and programmable controller
US8656137B2 (en) * 2011-09-01 2014-02-18 Qualcomm Incorporated Computer system with processor local coherency for virtualized input/output
JP5824472B2 (ja) * 2013-04-25 2015-11-25 京セラドキュメントソリューションズ株式会社 メモリーアクセス制御システム及び画像形成装置
CN104317770B (zh) * 2014-10-28 2017-03-08 天津大学 用于众核处理系统的数据存储结构及数据访问方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09198360A (ja) * 1996-01-18 1997-07-31 Shimadzu Corp プロセス制御装置
JP2001042905A (ja) * 1999-07-27 2001-02-16 Matsushita Electric Works Ltd プログラマブルコントローラ
JP2005292912A (ja) * 2004-03-31 2005-10-20 Yokogawa Electric Corp シミュレーション装置
US20130018507A1 (en) * 2011-07-13 2013-01-17 Kuka Roboter Gmbh Control System Of A Robot
JP2015076065A (ja) * 2013-10-11 2015-04-20 Mywayプラス株式会社 電力機器の制御装置、制御システム、制御方法および制御プログラム

Also Published As

Publication number Publication date
JPWO2018074590A1 (ja) 2019-02-28
CN109313426A (zh) 2019-02-05
JP6626216B2 (ja) 2019-12-25
US20190302724A1 (en) 2019-10-03
CN109313426B (zh) 2021-10-08

Similar Documents

Publication Publication Date Title
US10002085B2 (en) Peripheral component interconnect (PCI) device and system including the PCI
US10657039B2 (en) Control device for a motor vehicle
US20160004647A1 (en) Method and circuit arrangement for accessing slave units in a system on chip in a controlled manner
JP4874165B2 (ja) マルチプロセッサシステム及びマルチプロセッサシステムにおけるアクセス権設定方法
WO2016041191A1 (zh) 读写数据的方法、装置、存储设备和计算机系统
CN108628638A (zh) 数据处理方法及装置
US9639489B2 (en) I/O device sharing system and I/O device sharing method
US10162549B2 (en) Integrated circuit chip and method therefor
US10296257B2 (en) Control device and control method
JP2009187314A (ja) 二重化コントローラ・システム、cpuモジュール、そのプログラム
US20130117533A1 (en) Coprocessor having task sequence control
WO2018074590A1 (ja) コントローラ
JP2019204485A (ja) マシンラーニング装置、及びそれを利用したマシンラーニングシステム
JP2010079355A (ja) 複数plc間の協調制御システム
US11301410B1 (en) Tags for request packets on a network communication link
US20120254530A1 (en) Microprocessor and memory access method
CN106325377A (zh) 外部设备扩展卡及输入输出外部设备的数据处理方法
JP4985483B2 (ja) 計算機システム、ネットワークブートロードシステム、及び、そのブートロード方法
JP2015141648A (ja) プログラマブルコントローラ
US9645556B2 (en) Automation device
JP2020140380A (ja) 半導体装置及びデバッグシステム
JP6535516B2 (ja) マルチ・プログラマブルデバイス・システムとその制御方法
US11003474B2 (en) Semiconductor device for providing a virtualization technique
EP3327521B1 (en) Duplexing process control device
JP2022147609A (ja) コントローラ

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018545772

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 17862380

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17862380

Country of ref document: EP

Kind code of ref document: A1