WO2021002421A1 - 制御システム - Google Patents

制御システム Download PDF

Info

Publication number
WO2021002421A1
WO2021002421A1 PCT/JP2020/025985 JP2020025985W WO2021002421A1 WO 2021002421 A1 WO2021002421 A1 WO 2021002421A1 JP 2020025985 W JP2020025985 W JP 2020025985W WO 2021002421 A1 WO2021002421 A1 WO 2021002421A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
timer
counter
time
data
Prior art date
Application number
PCT/JP2020/025985
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 CN202080046725.8A priority Critical patent/CN114080574A/zh
Priority to JP2021529179A priority patent/JP7484912B2/ja
Priority to US17/623,374 priority patent/US20220413474A1/en
Priority to EP20834296.4A priority patent/EP3995910A4/en
Publication of WO2021002421A1 publication Critical patent/WO2021002421A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/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/052Linking several PLC's
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/41865Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by job scheduling, process planning, material flow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/12Synchronisation of different clock signals provided by a plurality of clock generators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock
    • 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/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • G06F15/17306Intercommunication techniques
    • G06F15/17325Synchronisation; Hardware support therefor
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13063Synchronization between modules
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13141Derive sequence program from design, cad data of machine
    • 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/30Nc systems
    • G05B2219/31From computer integrated manufacturing till monitoring
    • G05B2219/31001CIM, total factory control
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • This disclosure relates to an FA (Factory Automation) control system.
  • FA technology using a control device such as a PLC (programmable logic controller) is widely used at various production sites.
  • a control device sends and receives data to and from one or more devices via a bus or network.
  • Patent Document 1 discloses a control system in which a plurality of control devices are connected to a controller level network. A plurality of input / output devices are connected to each of the plurality of control devices via a device level network. Each control device transmits input values acquired from a plurality of input / output devices to a server via a controller level network.
  • Patent Document 2 Japanese Patent Application Laid-Open No. 2014-146877 (Patent Document 2), the first communication device and the second communication device are connected by a PCIe cable IF. Regarding the time synchronization correction amount calculation, the time request packet is transmitted from the first communication device to the second communication device, and the time response packet is transmitted from the second communication device to the first communication device.
  • Patent Document 1 since a plurality of control devices execute control processes independently of each other, the timing of collecting or generating data (input data) in the device between one control device and another control device. Alternatively, the timing of transmitting data (output data) such as commands to the device to the target device cannot be synchronized with each other.
  • Patent Document 2 provides a means for calculating the correction amount of time synchronization with respect to such timing synchronization, but it is required to exchange time request packets and time response packets as a procedure of time synchronization. Therefore, the synchronization procedure is complicated, and the time synchronization process including the packet communication time and correction takes time.
  • One object of the present disclosure is to provide a configuration that simplifies the processing required for time synchronization between units and shortens the processing time.
  • the timer indicated by the above timer is used between the first unit and the second unit, each having a timer, and the first unit and the second unit. It is provided with a data line for exchanging data including values, a signal line for electrically connecting the first unit and the second unit, and an adjusting means connected to the signal line and the data line for adjustment.
  • the means acquires a timer value via the data line, and sets the timer of the second unit to the timer of the first unit based on the acquired timer value.
  • the adjusting means acquires a timer value transmitted through the data line between the units when a trigger signal is given, and sets the timer of the second unit to the timer of the first unit based on the acquired timer value. ..
  • the time to set the timer can be easily determined by the trigger signal. Further, the adjusting means can adjust the timer by using the timer value transmitted through the data line. As a result, it is not necessary to have a communication session for requesting / responding to the timer value between the units for the time synchronization of adjusting the timer, so that the time related to the timer adjustment can be shortened accordingly.
  • one of the first unit and the second unit transmits the trigger signal to the signal line.
  • the transmission source of the trigger signal may be either the first unit or the second unit. Therefore, either the first unit or the second unit can determine when to perform the correction process.
  • control system further includes a unit that transmits a trigger signal to the signal line and is different from the first unit and the second unit.
  • the trigger signal can be transmitted to a unit different from the first unit and the second unit.
  • the adjusting means is provided in one of the first unit and the second unit.
  • either one of the first unit and the second unit can be made to perform a process for time synchronization of setting a timer.
  • control system further comprises a unit comprising adjusting means, which is different from the first unit and the second unit.
  • the first unit and another unit different from the second unit perform the process for time synchronization of setting the timer. Therefore, it is avoided to apply the load related to the processing to the first unit and the second unit.
  • the adjusting means when the adjusting means receives the trigger signal via the signal line, the timer value of the timer of the first unit and the timer of the second unit are used by using the timer value acquired via the data line.
  • the timer of the second unit can be changed to the timer of the first unit. match.
  • the adjustment value can be determined. For example, it is possible to carry out an adjustment in which the adjustment value is increased as the synchronization deviation is larger.
  • the adjusting means determines the adjusting value from the tendency of the change in the magnitude of the difference detected each time the trigger signal is received.
  • the adjustment value can be determined based on the tendency of the change in the magnitude of the synchronization deviation indicated by the above difference. For example, when the synchronization deviation tends to be large, adjustments that increase the adjustment value can be performed.
  • control system further comprises a plurality of control devices connected to the first network, each of the plurality of control devices including a first unit and a second unit, and the plurality of control devices. Is a common time received via the first network and synchronizes with each other according to the time used for synchronization between timers.
  • the time can be synchronized with each other between the control devices including the first unit and the second unit, and each control device uses a timer that synchronizes the time between the units. Can be synchronized. Therefore, each control device and each unit included in each control device can be synchronized with each other.
  • control system is further between one or more devices connected to each of the plurality of control devices and the plurality of control devices via a second network lower than the first network.
  • the control device and one or more devices connected to the second network of the control device are synchronized with each other by the timer value of the synchronization timer.
  • each control device each unit included in each control device, and each device connected to each control device can be synchronized with each other.
  • the processing required for time synchronization between units is simplified, and the processing time is shortened.
  • FIG. 1 is a schematic diagram showing an example of an application scene of the control system 1 according to the present embodiment.
  • the control system 1 according to the present embodiment is a control system for factory automation, and includes a plurality of control devices 2A, 2B, and 2C.
  • Each control device controls an arbitrary control target (for example, a manufacturing device or equipment) including a field device 90 (90A, 90B, 90C, 90D, 90E, 90F, 90I). Since each control device has the same configuration, the control device 2A will be described as a representative.
  • each control device 2A has a CPU unit 100 and a functional unit 200 each having a timer, a data bus 111 for exchanging data between the CPU unit 100 and the functional unit 200, and a CPU unit 100.
  • a signal line 113 for electrically connecting the function unit 200 and the function unit 200 is provided. Time synchronization is performed using the timer value indicated by the counter OC1 of the functional unit 200 and the timer value indicated by the counter DC2 of the CPU unit 100.
  • the functional unit 200 acquires the absolute time acquired from the master clock 191A, and sets a value synchronized with the acquired absolute time in the counter OC1.
  • the value of the counter value OC1 is transmitted to the CPU unit 100 via the data bus 111, and the CPU unit 100 sets the timer value, which is the value of the counter value OC1, to the counter DC2.
  • the CPU unit 100 periodically updates (increments or decrements) the value of the counter DC2 using the output of the internal hardware circuit.
  • the functional unit 200 After startup, the functional unit 200 periodically updates the value of the counter OC1 based on the absolute time acquired from the master clock 191A. The functional unit 200 periodically transmits the timer value, which is the value of the counter OC1, via the data bus 111.
  • a correction process for synchronizing the time is performed. Specifically, when the CPU unit 100 receives the time synchronization signal via the signal line 113, it latches (receives) the timer value indicated by the counter OC1 transmitted on the data bus 111, and the counter DC2 of the CPU unit 100. Acquires (latch) the timer value indicated by. Based on these acquired timer values, the CPU unit 100 sets the timer (counter DC2) of the CPU unit 100 to the timer (counter OC1) of the functional unit 200. That is, the CPU unit 100 calculates the difference between the acquired timer values, that is, the time synchronization deviation, and corrects the value of the counter DC2 so as to reduce the calculated synchronization deviation.
  • the correction of the timer value or the counter value is a concept including the adjustment of the timer value so as to reduce the time synchronization deviation.
  • the value of the counter DC2 is time-synchronized with the value of the counter OC1, that is, the master clock 191A. It will be possible.
  • the timer value of the counter DC2 is a control program for controlling various devices such as the field device 90, and an input / output program for exchanging data between the field device 90 and the network 110. Etc. are referenced for scheduling. Therefore, in each control device 2, such scheduling can be performed in synchronization with the timer value of the counter DC2 that is time-synchronized with the master clock 191A.
  • each control device 2 the correction process related to the time synchronization between the units can be executed by using the trigger signal as an opportunity.
  • the time synchronization signal as a trigger signal, for example, periodically, it is possible to periodically perform a correction process for correcting the value of the counter DC2 so as to eliminate (or reduce) the synchronization deviation. It becomes.
  • control devices 2A, 2B and 2C have a time-synchronized counter OC1 and a counter DC2 (corresponding to the time-synchronized (2) in the figure).
  • the time can be synchronized with each other between the plurality of control devices 2A, 2B and 2C (corresponding to the time synchronization (1) in the figure).
  • the counter DC2 included in each of the control devices 2A, 2B and 2C is a timer 91A, 91B, 91C, 91D, 91E, 91F, 91G, 91H included in one or a plurality of field devices 90 connected via the network 110.
  • 91I hereinafter collectively referred to as timers 91A to 91I
  • time-synchronized time-synchronized.
  • control devices 2A, 2B and 2C and the field devices 90A to 90I are time-synchronized with each other (corresponding to the time synchronization (3) in the figure).
  • the devices of the entire control system 1 can be synchronized with each other at the time of the master clock 191A.
  • PLC programmable controller
  • control device the technical concept disclosed in the present specification is arbitrary without being limited to the name of PLC. It is applicable to the control device of. Further, the entire system including the PLC (control device) is also referred to as a "control system” below.
  • FIG. 2 is a schematic diagram showing an example of the overall configuration of the control system 1 according to the present embodiment.
  • the networks are connected to a plurality of levels, and different functions are assigned to the networks at each level. Specifically, for example, four levels of networks 11 to 14 are provided, but not limited to.
  • Network 11 is a control level network.
  • the network 11 provides a plurality of control devices 2A, 2B and 2C (hereinafter, may be collectively referred to as "control device 2"), a device / line management device 190, and a SCADA (Supervisory Control And Data Acquisition) function.
  • the display device 280 is connected, and a data link capable of exchanging data between the devices is formed in the network 11.
  • the device / line management device 190 and the display device 280 correspond to devices connected to the network and devices for managing the production line.
  • the network 11 mainly provides transmission of information related to the control system as a main function.
  • Various field devices 90 such as sensors and actuators are connected to the control device 2. These field devices 90 may be directly connected to the control device 2 via an input / output unit mounted on the control device 2, or may be connected to the control device 2 via a network 110. In the configuration example shown in FIG. 2, the control device 2 is connected to one or more networks 110. One or more field devices 90 are connected to each network 110. Each of the one or more field devices 90 exchanges information with an actuator that exerts some physical action on a manufacturing apparatus, a production line, or the like (hereinafter, also collectively referred to as a "field"), and a field. Including input / output devices. Therefore, in addition to the four levels of networks 11 to 14, a field-level network 110 will be added to the control system 1 shown in FIG.
  • the data exchanged between the control device 2 and the field device 90 via the network 110 is updated in a very short cycle of several hundred ⁇ sec order to several tens of msec order.
  • the data update process of such exchanged data is also referred to as input / output refresh process.
  • Network 12 is provided as a management level network.
  • a device / line management device 190 for managing devices and lines, and manufacturing control devices 380 and 390 for managing manufacturing plans and the like are connected to the network 12.
  • the device / line management device 190, the manufacturing control devices 380 and 390 exchange management information such as a manufacturing plan and exchange device or line information via the network 12.
  • Network 13 is provided as a computer-level network.
  • the manufacturing control devices 380 and 390 and the manufacturing execution system (EMS: Manufacturing Execution System) 400 that manages the time series DB (abbreviation of database) 450 are connected to the network 13.
  • the manufacturing control devices 380 and 390, and the manufacturing execution system 400 exchange production control and information system data via the network 13.
  • the manufacturing execution system 400 stores the observed values, which are input values from the field device 90 collected via the network 13, in the time series DB 450 as time series data according to the observed order.
  • the control device 2 has a function of generating a frame including a designated observed value.
  • the control device 2 transfers the generated frame to the manufacturing execution system 400 via the networks 11, 12 and 13.
  • the manufacturing execution system 400 stores the frames of the observed values received from the control device 2 in the time series DB 450 according to the time series.
  • time series data is a series of data obtained by continuously (or discontinuously) observing changes in data (observed values) for an arbitrary object over time. Means a value.
  • the "observed value” is a concept that collectively refers to a value (actual value) that can be used in a control calculation in the control device 2, and is typically acquired from a controlled object and input to the control calculation. Values (measured values obtained from fields, etc.), output values for controlled objects determined by control operations based on the acquired input values (command values given to fields, etc.), operations calculated in the process of control operations It can include values (arbitrary variable values) and the like. That is, the "observed value” includes an arbitrary value that can be stored as data in the control device 2 or can be output externally as data from the control device 2.
  • Network 14 includes an external network such as the Internet.
  • the manufacturing execution system 400 and an external device on the cloud are connected to the network 14.
  • the manufacturing execution system 400 transfers the data of the time series DB 450 to the device on the cloud by exchanging data with the device on the cloud.
  • the support device 500 can be connected to the control device 2.
  • the support device 500 is a device that supports the preparation necessary for the control device 2 to control the controlled object.
  • step 3A shows an assembly process of a product (work)
  • step 3B shows a painting process of the assembled product
  • step 3C shows an inspection process of the painted product.
  • control system data data for actually controlling the device
  • control system data data for actually controlling the device
  • the network 13 and the network 14 at a higher level are also called “corporate network”, and data for monitoring, managing, and controlling production activities at a production line / factory (hereinafter, "information system data"). (Sometimes collectively referred to as) to provide information-related communications.
  • protocols and frameworks corresponding to such differences in required characteristics are adopted.
  • EtherNet / IP registered trademark
  • EtherCAT registered trademark
  • the protocol of the network 11 (first protocol) and the protocol of the network 110 (second protocol) may be the same or different.
  • each of the plurality of control devices 2A, 2B, and 2C connected to the network 11 transmits and receives data to and from one or more field devices 90 connected via the network 110.
  • the control device 2 has a process of collecting data (input data) collected or generated by the field device 90 (input process) and a process of generating data (output data) such as a command to the field device 90 (output data). Arithmetic processing) and processing (output processing) of transmitting the generated output data to the target field device 90 are executed.
  • control device 2 has a timer that defines the timing of data transmission and is time-synchronized with each other between the subjects (that is, one or a plurality of field devices 90) to which data is transmitted and received.
  • the time is not synchronized between the plurality of control devices 2, for example, the field device 90 connected to one control device 2 and the field device 90 connected to another control device 2 The time cannot be synchronized between them. As a result, the timings of the input / output refresh processes may not match, and it becomes difficult to operate a plurality of field devices 90 connected to different control devices 2 in cooperation with each other.
  • the timers of the plurality of control devices 2 are time-synchronized with each other. As a result, it is possible to realize coordinated control of a plurality of field devices 90 connected to different control devices 2, that is, between different processes.
  • FIG. 3 is a schematic diagram showing a network configuration example of the control system 1 according to the present embodiment.
  • the control system 1 shown in FIG. 3 includes a plurality of control devices 2A, 2B and 2C, and a plurality of field devices 90A to 90I.
  • the control system 1 employs a network in which at least some control devices are daisy-chained.
  • Each of the control devices 2A, 2B and 2C functions as a master that manages data transmission within the corresponding network 110.
  • the field devices 90A to 90I function as slaves that perform data transmission in accordance with a command from the corresponding master.
  • the control devices 2A, 2B and 2C are connected to the control level network 11 (upper network).
  • a device / line management device 190 is connected to the network 11.
  • Field devices 90A, 90B, and 90C are sequentially connected to the network 110 connected to the control device 2A by a daisy chain, and field devices 90D, 90E, and 90F are daisy chained to the network 110 connected to the control device 2B.
  • Field devices 90G, 90H, and 90I are sequentially connected by a daisy chain to the network 110 which is sequentially connected by a chain and is connected to the control device 2C.
  • control device 2 and one or a plurality of field devices 90 can all be regarded as communication devices having a data transmission function.
  • the control device 2 and one or a plurality of field devices 90 receives data transmitted on the network from a communication device connected adjacently, the data is required. It has a function of transmitting to another communication device connected adjacently according to the above.
  • the transmission / reception timing is synchronized between the plurality of communication devices connected to the network 110, that is, the control device 2 and the one or the plurality of field devices 90 (time synchronization in the figure). Equivalent to (3)).
  • each of the control device 2 and one or the plurality of field devices 90 includes a timer (or a counter that is synchronously incremented or decremented) that is time-synchronized with each other.
  • Each of the controller 2 and one or more field devices 90 determines the timing of data transmission or reception according to their time-synchronized timers or counters.
  • timing represents the concept of time, time, or time when some event occurs.
  • time synchronization means that the timers, time data, etc. of each other are synchronized.
  • timers 101A, 101B and 101C correspond to counter OC1 (see FIG. 1), respectively, and timers 102A, 102B and 102C correspond to counter DC2 (see FIG. 1), respectively.
  • time synchronizations (1), (2) and (3) shown in FIG. 1 will be described more specifically with reference to FIG.
  • the control device 2A includes a timer 102A, and the field devices 90A, 90B, and 90C include timers 91A, 91B, and 91C, respectively.
  • the timer 102A of the control device 2A functions as a master, and the timers 91A, 91B, 91C of the field devices 90A, 90B, 90C synchronize the timing with reference to this master. For example, a value based on the timer value of the timer 102A is set in the timers 91A, 91B, 91C.
  • the control device 2B has a timer 102B, and the field devices 90D, 90E, 90F have timers 91D, 91E, 91F, respectively.
  • the timer 102B of the control device 2B functions as a master, and the timers 91D, 91E, 91F of the field devices 90D, 90E, 90F synchronize the timing with reference to this master. For example, values based on the timer value of the timer 102B are set in the timers 91D, 91E, and 91F.
  • the control device 2C has a timer 102C, and the field devices 90G, 90H, 90I have timers 91G, 91H, 91I, respectively.
  • the timer 102C of the control device 2C functions as a master, and the timers 91G, 91H, 91I of the field devices 90G, 90H, 90I synchronize the timing with reference to this master. For example, values based on the timer value of the timer 102C are set in the timers 91G, 91H, and 91I.
  • each of the control devices 2A, 2B, and 2C functions as a master that manages data transmission in the corresponding network 110, and the field device 90 connected to each control device 2 transmits data according to a command from the master. Acts as a slave to do. By synchronizing the timers with each other between the master and the slave, it is possible to match the data transmission timing and the like between the control device 2 constituting the network 110 and the field device 90.
  • the control device 2A further has a timer 101A that is time-synchronized with the timer 102A.
  • the control device 2B further has a timer 101B that is time-synchronized with the timer 102B.
  • the control device 2C further has a timer 101C that is time-synchronized with the timer 102C (corresponding to the time synchronization (2) in the figure).
  • any of the timers 101A, 101B and 101C can function as a master of the entire control system 1.
  • the timer 101A of the control device 2A is set as the master, and the timers of the control devices 2B and 2C synchronize the time with this master.
  • the time can be synchronized with each other between the plurality of control devices 2A, 2B and 2C (corresponding to the time synchronization (1) in the figure).
  • each of the plurality of control devices 2A, 2B and 2C has an inter-device timer (timers 101A, 101B and 101C) whose time is synchronized with each other among the plurality of control devices 2A, 2B and 2C, and the network 110. It has inter-device timers (timers 102A, 102B and 102C) that are time-synchronized with one or more field devices 90 connected via the inter-device timer, and the inter-device timer and the inter-device timer are time-synchronized with each other. ..
  • timer 102A time-synchronized between the control device 2A and the field devices 90A, 90B, 90C and the device time-synchronized between the control device 2B and the field devices 90D, 90E, 90F.
  • the timer (timer 102B) and the inter-device timer (timer 102C) whose time is synchronized between the control device 2C and the field devices 90G, 90H, and 90I are time-synchronized with each other.
  • FIG. 2 has described a configuration example in which the timer of any of the control devices 2 is set as the master, the time acquired from the outside via the network 11 may be used as the master, or the device / line management device 190.
  • the timer of an external device such as may be used as a master.
  • FIG. 4 is a schematic diagram showing data communication processing of the control system 1 according to the present embodiment.
  • data is exchanged between the control device 2A connected to the network 110 and the plurality of field devices 90A to 90C according to a predetermined system cycle.
  • the data collected from the field device 90 by each control device 2 by the input processing and the output data generated by the arithmetic processing according to a predetermined system cycle. Etc. are exchanged.
  • the field device 90 connected to the control device 2A, the field device 90 connected to the control device 2B, and the field device 90 connected to the control device 2C can be operated in cooperation with each other. That is, the field equipment 90 can be operated in cooperation between different processes.
  • communication on the network 11 is also referred to as "upper network (NW) communication".
  • the timing at which the transmission of data in the lower network communication should be started is determined based on the timers that are time-synchronized with each other among the plurality of control devices 2A, 2B and 2C. ..
  • the timing of exchanging data with the field device 90 can be matched between the plurality of control devices 2A, 2B and 2C, and as a result, the field device 90 can be used between different processes.
  • the control timing can be synchronized.
  • FIG. 5 is a schematic view showing a configuration example of a unit of the control device 2 according to the present embodiment.
  • the control device 2 included in the control system 1 includes a CPU (Central Processing Unit) unit 100 (hereinafter referred to as a CPU unit 100), one or more functional units 200, and one or more functions. Includes unit 300.
  • the number of functional units 300 included in the control device 2 is four, but it may be one or two or more, and the number of functional units 200 included in the control device 2 is one, but two or more. It may be there.
  • the CPU unit 100 connects one or more functional units 200 to the data bus 111 via the signal line 113. Further, the CPU unit 100 connects one or a plurality of functional units 300 via the data bus 112.
  • the data bus 111 is, but is not limited to, an I / O serial interface bus that complies with, for example, PCIe (PCI Express).
  • the signal line 113 is an optical fiber cable or an electrical signal cable, and transmits a time synchronization signal 130 which is a trigger signal.
  • the CPU unit 100 has a program execution unit that executes a program created according to the control target. More specifically, the CPU unit 100 corresponds to an arithmetic processing unit that executes a system program and various user programs.
  • the functional unit 200 carries out communication processing or information processing.
  • the functional unit 200 includes an interface for connecting the data bus 111 and a signal port 212P for connecting the signal line 113.
  • the functional unit 200 is arranged so as to mediate between the network 11 and the control device 2, so that the CPU unit 100 communicates data with a device connected to the network 11 via the functional unit 200. It can be carried out. Further, by connecting the signal line 113 between the signal port 110P of the CPU unit 100 and the signal port 212P of the functional unit 200, the CPU unit 100 and the functional unit 200 transmit the time synchronization signal 130 via the signal line 113. Receive.
  • the functional unit 200 monitors the access to the CPU unit 100 from the Internet such as the network 14, and the access to the CPU unit 100 from other devices in the network 11, and the occurrence of some security event. Is detected, the inside or outside of the control device 2 is notified of the detected security event.
  • the information processing performed by the functional unit 200 is not limited to the security monitoring process.
  • the functional unit 300 functions as a so-called I / O unit that exchanges signals with equipment and devices to be controlled such as a field device 90 and various devices (sensors, actuators, etc.) arranged therein. Be prepared. Specifically, the functional unit 300 outputs the command value calculated by the CPU unit 100 to the field, or collects the input value from the field.
  • the functional unit 300 includes, for example, a DI (Digital Input) module that receives a digital signal from a control target, a DO (Digital Output) module that outputs a digital signal to the control target, and an AI (AI) that receives an analog signal from the control target.
  • DI Digital Input
  • DO Digital Output
  • AI AI
  • the functional unit 300 may include a controller equipped with special functions such as PID (Proportional Integral Derivative) control and motion control.
  • PID Proportional Integral Derivative
  • the functional unit 200 or the functional unit 300 can be provided as an expansion unit that can be detachably attached to the CPU unit 100.
  • FIG. 6 is a block diagram showing a hardware configuration example of the CPU unit 100 included in the control device 2 according to the present embodiment.
  • the CPU unit 100 includes a processor 102, a chipset 104, a main storage device 106, a secondary storage device 108, a higher-level network controller 105, a USB (Universal Serial Bus) controller 107, a memory card interface 114, and the like. Includes local bus controllers 120 and 122, field network controllers 118, counter 126, RTC (Real Time Clock) 128, and signal port 110P.
  • a processor 102 includes a processor 102, a chipset 104, a main storage device 106, a secondary storage device 108, a higher-level network controller 105, a USB (Universal Serial Bus) controller 107, a memory card interface 114, and the like.
  • the processor 102 is composed of a CPU, an MPU (microprocessor unit), a GPU (Graphics Processing Unit), etc., and reads various programs stored in the secondary storage device 108, expands them in the main storage device 106, and executes them. , Control according to the control target, and various processes as described later are realized.
  • the secondary storage device 108 is composed of, for example, a non-volatile storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive).
  • the main storage device 106 is composed of a volatile storage device such as a DRAM (Dynamic Random Access Memory) or a SRAM (Static Random Access Memory).
  • the chipset 104 realizes the processing of the CPU unit 100 as a whole by controlling the processor 102 and each device.
  • the secondary storage device 108 in addition to the system program for realizing the basic functions, the user program created according to the manufacturing device and equipment to be controlled is stored. Further, the secondary storage device 108 also stores a time series database as described later.
  • the upper network controller 105 exchanges data with the manufacturing execution system 400 or a device on the cloud (see FIG. 1) via the upper network 11.
  • the USB controller 107 controls the exchange of data with the support device 500 via the USB connection.
  • the memory card interface 114 is configured so that the memory card 116 can be attached and detached, data can be written to the memory card 116, and various data (user programs, trace data, etc.) can be read from the memory card 116. ing.
  • the counter 126 is used as a time reference for managing the execution timing of various processes in the CPU unit 100.
  • the counter 126 typically increments or decrements the counter value at predetermined intervals.
  • the CPU unit 100 may be mounted as a counter 126 by using a high precision event timer (HPET: High Precision Event Timer) or the like, which is a hardware timer arranged on the system bus that drives the processor 102. Alternatively, it may be mounted using a dedicated circuit such as ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array).
  • HPET High Precision Event Timer
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the RTC128 is a kind of counter having a timekeeping function, and provides the current time to the processor 102 or the like.
  • the local bus controller 122 is an interface for exchanging data with the functional units 300-1, 300-2, ... Which can be connected to the CPU unit 100.
  • the local bus controller 122 uses a counter 123 as a time reference for managing timing between the functional units 300-1, 300-2, ..., Which are other devices connected via the data bus 112. Have.
  • each of the functional units 300-1, 300-2, ... Has a counter 125 used as a time reference for managing timing between the local bus controller 122 and the other functional units 300. ..
  • the same configuration as the counter 126 described above can be adopted.
  • the field network controller 118 controls the exchange of data with other devices including the field device 90 via the network 110.
  • the field network controller 118 has a counter 119 used as a time reference for managing timing with other devices.
  • the local bus controller 120 is an interface for exchanging data with the functional units 200-1, 200-2, ... Which can be connected to the CPU unit 100.
  • the local bus controller 120 uses a counter 121 as a time reference for managing timing between the functional units 200-1, 200-2, ..., Which are other devices connected via the data bus 111. Have.
  • each of the functional units 200-1, 200-2, ... Has a counter 213 used as a time reference for managing the timing with the local bus controller 120.
  • the counter 121 and the counter 213 can adopt the same configuration as the counter 126 described above.
  • each device on the network 110 also has a counter used as a time reference for managing the timing with the field network controller 118.
  • the same configuration as the counter 126 described above can be adopted.
  • the field network controller 118 functions as a communication master for performing constant periodic communication via the network 110, and is the difference between the counter value indicated by the counter of each device connected to the fieldbus and the counter value indicated by the counter 119. Is sequentially monitored, and if necessary, a synchronization signal for instructing correction is output to the device in which the counter value is deviated. As described above, the field network controller 118 has a synchronization management function for giving a command to the device to match the counter value indicated by the counter of the device with the counter value indicated by the counter 119.
  • a signal line 113 that transmits a time synchronization signal 130 is connected to the signal port 110P.
  • the counter 119, the counter 121, and the counter 123 are synchronized with the counter 126.
  • FIG. 6 shows a configuration example in which the necessary functions are provided by the processor 102 executing the program, and the CPU unit 100 uses dedicated hardware for some or all of these provided functions. It may be implemented using a circuit (for example, ASIC (Application specific Integrated Circuit) or FPGA (Field-Programmable Gate Array)). Alternatively, the main part of the CPU unit 100 may be realized by using hardware that follows a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, the virtualization technology may be used to execute a plurality of OSs (Operating Systems) having different uses in parallel, and to execute necessary applications on each OS.
  • OSs Operating Systems
  • the CPU unit 100 and the support device 500 are configured as separate bodies, but a configuration is adopted in which all or part of these functions are integrated into a single device. You may.
  • FIG. 7 is a block diagram showing a hardware configuration example of the functional unit 200 included in the control device 2 according to the present embodiment.
  • functional unit 200 includes processor 202, chipset 204, main memory 206, storage 208, inter-unit interface 210, network interface 220, and signal port 212P.
  • a signal line 113 that transmits a time synchronization signal 130 is connected to the signal port 212P.
  • the processor 202 is composed of a CPU, an MPU, a GPU, and the like. Like the CPU unit 100 described above, the functional unit 200 has one or more processors 202 and / or a processor 202 having one or more cores. By controlling the processor 202 and peripheral elements, the chipset 204 realizes the processing of the functional unit 200 as a whole.
  • Chipset 204 includes a signal generator 26, which is a circuit element that generates a time synchronization signal 130. The time synchronization signal 130 from the signal generator 26 is sent to the signal line 113 via the signal port 212P.
  • the main memory 206 is composed of a volatile storage device such as a DRAM or SRAM.
  • the storage 208 is composed of, for example, a non-volatile storage device such as a flash memory.
  • the processor 202 reads various programs stored in the storage 208, expands them in the main memory 206, and executes them to realize processing such as monitoring of security events.
  • the storage 208 stores a system program 22 and a user program 20 for realizing basic processing. Further, the storage 208 has a storage area 21 for storing time-series data of the observed values collected by the functional unit 200.
  • the user program 20 includes a time synchronization program 23 that controls time synchronization between units and a security program 24 for security monitoring processing.
  • the time synchronization program 23 includes a correction program 25 for realizing the correction unit 20A or the correction unit 20B described later by being executed.
  • the security program 24 performs security monitoring processing based on security settings that prescribe rules and the like defined in advance by the operator or administrator of the control device 2, collects observation values based on the processing results, and takes time. It is stored in the storage area 21 as series data.
  • the inter-unit interface 210 connects the data bus 111.
  • the inter-unit interface 210 exchanges data with the CPU unit 100 via the data bus 111.
  • the inter-unit interface 210 includes a data communication circuit 211 including a controller (Tx / Rx CTRL) and a buffer for transmitting and receiving data to and from the CPU unit 100 or another functional unit 200, and a counter 213.
  • a controller Tx / Rx CTRL
  • a buffer for transmitting and receiving data to and from the CPU unit 100 or another functional unit 200, and a counter 213.
  • the network interface 220 includes a controller (Tx / Rx CTRL) 222 and a buffer 226 for exchanging data via the network 11.
  • the buffer provided in the inter-unit interface 210 and the network interface 220 corresponds to a storage unit that temporarily stores data to be transmitted and data received.
  • the counter 213 has the same configuration as the counter 126 (see FIG. 6) included in the CPU unit 100.
  • the network interface 220 and the inter-unit interface 210 of the functional unit 200 may be composed of a NIC (Network Interface Card). Further, FIG. 7 shows a configuration example in which necessary processing is realized by executing a program by the processor 202, and a part or all of the processing provided is a dedicated hardware circuit (for example,). , ASIC, FPGA, etc.).
  • FIG. 8 is a block diagram showing a hardware configuration example of the functional unit 300 included in the control device 2 according to the present embodiment.
  • the functional unit 300 provides various functions necessary for realizing control of various machines or equipment by the control system 1. More specifically, each of the functional units 300 includes a functional module 157, an I / O interface 159, and a communication circuit 161.
  • the function module 157 is a part that executes the main processing of each function unit 300, and controls the collection of field information from the machine or equipment to be controlled and the output of a command signal to the machine or equipment to be controlled.
  • the I / O interface 159 is a circuit that mediates the exchange of signals with a machine or equipment to be controlled.
  • the communication circuit 161 processes the data sequentially transferred to the data bus 112. That is, when the communication circuit 161 receives some data via the data bus 112, the communication circuit 161 processes the received data and then transmits the communication data to the functional unit 300 located next on the data bus 112.
  • the communication circuit 161 provides a function of relaying such data.
  • the communication circuit 161 includes transmission / reception ports 162, 164, a controller 166 for transmission / reception, and a counter 168.
  • the transmission / reception ports 162 and 164 are parts that are physically connected to the data bus 112, and perform processing such as reception and reproduction of data transmitted on the data bus 112 in accordance with a command from the controller 166 to perform data. Achieve sequential transfer of.
  • the controller 166 performs data processing such as reading data transferred on the data bus 112 and changing the data.
  • the counter 168 generates a clock that serves as a reference for timing such as command output by the controller 166 or processing execution by the function module 157.
  • a counter using a real-time clock can be adopted, but in the present embodiment, a free-run counter that counts up (increments) at a predetermined cycle can be applied.
  • FIG. 9 is a block diagram showing a software configuration example of the CPU unit 100 according to the present embodiment.
  • the CPU unit 100 includes a PLC engine 150, a time series database 180, an upper connection program 192, and a gateway program 194.
  • the PLC engine 150 typically has an execution environment for various programs in which the processor 102 of the CPU unit 100 reads out the system program stored in the secondary storage device 108, deploys it to the main storage device 106, and executes it. Is provided, and various programs can be executed in the execution environment.
  • the PLC engine 150 includes a control program 152, a variable management program 160, a scheduler program 170, an input program 172, an output program 174, and a time synchronization program 177.
  • the variable management program 160, the scheduler program 170, the input program 172, and the output program 174 may be implemented as a part of the system program. In this case, each function provided by these programs may be provided by a single system program.
  • the control program 152 is typically composed of a user program 154, a database writing program 156, and a serialization communication program 158.
  • the user program 154 corresponds to a main part that provides a control calculation function, and can be arbitrarily configured according to a manufacturing device or equipment to be controlled by the CPU unit 100.
  • the user program 154 can be defined by, for example, ladder logic using a function block or the like.
  • the database writing program 156 is called by the instruction specified in the user program 154 and writes the specified data to the time series database 180.
  • the serialization communication program 158 performs serialization processing on the data written from the database writing program 156 to the time series database 180. More specifically, the serialization communication program 158 executes a process (serialization) of converting time series data into a storeable byte string. The target data is converted into a predetermined byte string by the serialization process and then stored in the time series database 180. It should be noted that the serialization process does not necessarily have to be performed according to the speed of writing data to the time series database 180, the data capacity, and the like. That is, the serialized communication program 158 has an optional configuration.
  • the variable management program 160 manages the values available in the PLC engine 150 in the form of variables. More specifically, the variable management program 160 includes system variables indicating the state of the CPU unit 100 and device variables indicating values held by various devices connected to the CPU unit 100 via the local bus or field bus. , A user variable indicating a value held by the user program 154 executed by the CPU unit 100 is managed.
  • the input program 172 provides a function of acquiring input data from various devices connected to the CPU unit 100 via a local bus or a field bus.
  • the output program 174 outputs a command value (output data) calculated by the user program 154 executed in the CPU unit 100 to a target device connected via the data bus 112 or the network 110.
  • the time synchronization program 177 connects to the CPU unit 100, the functional unit 200 connected to the data bus 111, the functional unit 300 connected to the data bus 112, and the network 110 when the control program in the CPU unit 100 is executed.
  • the time synchronization with the field device 90 to be performed is realized.
  • the time synchronization program 177 includes a correction program 178 for appropriately correcting a timer managed for time synchronization.
  • the correction unit 10B described later is realized. The correction process performed by the correction unit 10B will be described later.
  • the scheduler program 170 manages resource allocation, execution timing, etc. for processes or tasks of the CPU unit 100.
  • a process or task includes a process or task that can be generated by executing the control program 152, the variable management program 160, the input program 172, the output program 174, the time synchronization program 177, and the like by the CPU unit 100. ..
  • the time-series database 180 is typically located in the main storage 106 or the secondary storage 108, and has the function of storing data and responds to the specified data in response to an external request (query). It is equipped with a search function.
  • the time series database 180 stores the time series data 182 written by the database writing program 156. That is, the time series database 180 stores at least a part of the input data, the output data, the calculation data calculated in the control calculation by the control program 152, the manufacturing data, and the event data in the time series.
  • Such input data and output data include data received by the CPU unit 100 from the functional unit 300 and data transmitted by the CPU unit 100 to the functional unit 300.
  • the event data may include data related to security monitoring received by the CPU unit 100 from the functional unit 200.
  • the upper connection program 192 exchanges data with an external device connected to the upper network 13 such as the manufacturing execution system 400.
  • input data and calculation data can be output from the CPU unit 100 to the manufacturing execution system 400, and manufacturing information can be received from the manufacturing execution system 400.
  • the higher-level connection program 192 provides a manufacturing data acquisition function for acquiring manufacturing data from the manufacturing execution system 400 associated with the controlled object.
  • the manufacturing execution system 400 has a time series DB 450.
  • the database connection program 193 may be provided in place of the upper connection program 192 or as a part of the upper connection program 192.
  • the database connection program 193 may, for example, send a query such as SQL to a relational database and execute a process of receiving a response.
  • the time-series data 182 of the time-series database 180 in the CPU unit 100 can be transferred to the manufacturing execution system 400 and stored in the time-series DB 450. Details of the time-series data output to the manufacturing execution system 400 by the database connection program 193 will be described later.
  • the gateway program 194 communicates with the device on the cloud.
  • the time series data 182 of the time series database 180 is provided to the device that provides the IoT service on the cloud.
  • the gateway program 194 acquires data of a specified type from the time series database 180 at a specified cycle and outputs the data as time series data.
  • the time-series data output to the IoT service providing device by the gateway program 194 can have, for example, the same configuration as the time-series data output to the manufacturing execution system 400 by the database connection program 193.
  • the input program 172 of the CPU unit 100 acquires input data from a field device 90 such as a sensor via the data buses 111, 112 and / or the network 110.
  • the upper connection program 192 of the CPU unit 100 acquires manufacturing data from the manufacturing execution system 400.
  • the variable management program 160 manages these acquired input data and manufacturing data as variables.
  • the user program 154 executes a predetermined control operation while referring to the system variables, device variables, and user variables managed by the variable management program 160, and outputs the execution result (output data) to the variable management program 160. To do.
  • the output program 174 outputs the output data calculated by the control calculation of the user program 154 as control output to the field device 90 such as an actuator via the data bus 112 and / or the network 110.
  • the database writing program 156 writes the specified observation values among the variables managed by the variable management program 160 into the time series database 180.
  • the upper connection program 192 uses the values of the specified variables among the variables managed by the variable management program 160 and / or the specified data of the time series data 182 stored in the time series database 180 in a time series. It is output as data to the manufacturing execution system 400.
  • the gateway program 194 uses the values of the specified variables among the variables managed by the variable management program 160 and / or the specified data among the time series data 182 stored in the time series database 180 as time series data. Is output to the IoT service.
  • the IoT service providing device provides, for example, a service that performs behavior analysis based on time-series data from the CPU unit 100 and performs predictive maintenance of equipment and devices to be controlled.
  • the control device 2 has a function of synchronizing the time and the counter (hereinafter, also referred to as “time synchronization” and “counter synchronization”, respectively).
  • time is intended to indicate a certain point in the flow of time, and is defined by using a unit such as hour, minute, or second.
  • the "counter” includes a value for controlling timing in the control device 2 and related devices, and is basically a value that is incremented or decremented by a predetermined value every predetermined unit time (hereinafter referred to as "counter”).
  • the value indicated by the counter is also referred to as "counter value”).
  • the counter value corresponds to the value of the timer, and represents, for example, a 64-bit length integer value capable of expressing the order of nanoseconds, without limitation.
  • the synchronization accuracy of the time is inferior to the synchronization accuracy of the counter. Therefore, in the present embodiment, between the units constituting the control device 2 and between each unit and another device including the field device 90. In between, time synchronization using a counter value is adopted.
  • FIGS. 10A and 10B are diagrams schematically showing an example of a configuration for time synchronization managed by the control device 2 according to the present embodiment.
  • a configuration for each control device 2 to acquire a counter value of the master clock from the network 11 and a configuration for realizing time synchronization using the time synchronization signal 130 as a trigger will be described.
  • the time synchronization signal 130 is generated by the signal generator 26 (see FIG. 7) of the functional unit 200 and transmitted to the signal line 113.
  • the configuration for realizing such time synchronization is, for example, a case where the master clock of TSN (Time-Sensitive Networking) is provided to the control device 2 via the network 11 (see FIG. 10A), and a case where the control device 2 is provided with the network 11.
  • TSN Time-Sensitive Networking
  • EtherCAT registered trademark: Ethernet for Control Automation Technology
  • the standard of the master clock provided to the control device 2 via the network 11 is not limited to these, and may be, for example, IECEE1588.
  • the TSN master clock 191A is provided by, for example, the device / line management device 190 on the network 11.
  • the master clock 191A indicates, for example, an absolute time managed by a time synchronization server located on the Internet.
  • the master clock 191A may be another device on the network 11.
  • the functional unit 200 includes a synchronization processing unit 200A when the time synchronization program 23 is executed.
  • the synchronization processing unit 200A communicates with the device / line management device 190 via the network interface 220 and refers to the master clock 191A. Further, the synchronization processing unit 200A has a counter DC1 and a counter OC1.
  • the synchronization processing unit 200A may include a correction unit 20A that performs correction processing for the counter value.
  • the counter DC1 and the counter OC1 correspond to, for example, the counter 213 (see FIG. 6 or 7).
  • the CPU unit 100 includes a synchronization processing unit 100A by executing the time synchronization program 177.
  • the synchronization processing unit 100A includes a correction unit 10B, a storage area 10C, a counter DC2, and a counter OC2.
  • the counter DC2 corresponds to the counter 119 and the counter 123 (see FIG. 6).
  • the counter DC2 also corresponds to a counter (counter 126 or the like in FIG. 6) referred to by the scheduler program 170 to schedule the execution timing of the control program 152 or the like.
  • the counter OC2 corresponds to the counter 121 (see FIG. 6).
  • the counters OC1 and OC2 represent counters by Ordinary Clock, and counters DC1 and DC2 represent counters by Distributed Clock.
  • the synchronization processing unit 200A uses the function of the device / line management device 190 as a time synchronization server to correct the transmission delay of the network 11 or the like when acquiring the time of the master clock 191A. As a result, the synchronization processing unit 200A can acquire a more accurate time from the master clock 191A.
  • the synchronization processing unit 200A sets a counter value based on the time acquired from the master clock 191A in the counter OC1.
  • the synchronization processing unit 200A periodically acquires the time of the master clock 191A from the device / line management device 190 and sets it in the counter OC1.
  • the synchronization processing unit 200A can synchronize the counter OC1 with the master clock 191A.
  • the functional unit 200 functions as a time synchronization server with respect to the CPU unit 100. That is, the synchronization processing unit 200A periodically transmits the counter value of the counter OC1 to the data bus 111. As a result, the functional unit 200 can provide the CPU unit 100 connected to the data bus 111 with a counter value synchronized with the master clock 191A (that is, a counter value of the counter OC1).
  • the synchronization processing unit 100A of the CPU unit 100 receives the timer value of the counter OC1 via the data bus 111 at startup, and sets the received timer value in the counter OC2. After that, the synchronization processing unit 100A periodically updates (increments or decrements) the counter value of the counter OC2 in synchronization with the output from the internal hardware circuit, and sets the updated value in the counter DC2. As a result, the counter value of the counter DC2 is periodically updated.
  • the synchronization processing unit 100A synchronizes the counter OC2 and the counter DC2 with the counter OC1 synchronized with the master clock 191A, so that the counter DC2 can be synchronized with the master clock 191A.
  • the CPU unit 100 performs program scheduling based on the synchronization between the master clock 191A and the counter described above. This point will be described with reference to FIGS. 6 and 9. More specifically, the scheduler program 170 performs scheduling of the control program 152 and the like with reference to the counter 126. Further, the input program 172 and the output program 174 perform time synchronization with each device with reference to the counter 119 and the counter 123 synchronized with the counter 126. As a result, scheduling of the control program 152 and the like in the CPU unit 100 and time synchronization between each device connected to the control device 2 and the control device 2 can be performed with reference to the master clock 191A. As a result, scheduling of a control program or the like in the CPU unit 100 and input / output between each device connected to the control device 2 and the control device 2 can be performed in synchronization with the master clock 119A.
  • the synchronization processing unit 100A corrects the counter value of the counter DC2 by using a value for reducing the synchronization deviation (hereinafter, also referred to as an adjustment value D). Specifically, when the correction unit 10B receives the time synchronization signal 130 from the signal line 113, the correction unit 10B performs a correction process including a latch process.
  • the correction unit 10B latches (acquires) the counter value of the counter DC2, and stores the latched counter value LDC2 in the storage area 10C. Further, in the latch processing, the correction unit 10B latches (receives) the counter value of the counter OC1 transmitted via the data bus 111, and stores the latched counter value LOC1 in the storage area 10C.
  • the adjustment value D (positive value or negative value) is added to the latched counter value, and the added value is set in the counter DC2.
  • the adjustment value D may be added to the counter value of the counter DC2 at a specified frequency.
  • the above adjustment value D is fixed or variable.
  • the variable value may include a value determined according to the magnitude of the difference between the latched counter values LOC1 and LDC2. Further, the value of "N" may be fixed or variable, and the variable value may include, for example, a value determined according to the magnitude of the adjustment value D.
  • the correction unit 10B detects a tendency of a change (drift-like change) in the difference between the counter values LOC1 and LDC2, which is calculated each time the time synchronization signal 130 is received, and adjusts the above adjustment value according to the change tendency.
  • the value of D or "N” may be determined. That is, the value of the above adjustment value D or "N” is determined so that the synchronization deviation calculated each time the time synchronization signal 130 is received becomes small, that is, the difference in synchronization deviation converges to a predetermined value. .. For example, by increasing the adjustment value D or decreasing the value of "N" as the fluctuation range is larger, the synchronization deviation can be reduced and the synchronization deviation can converge to a predetermined value earlier.
  • the initialization of the counter DC2 by setting the above adjustment value D to the value of the counter DC2 may be included.
  • the timing at which the correction process is performed may be the time when the time synchronization signal 130 is received, or may be after a predetermined time has elapsed from the time when the time synchronization signal 130 is received.
  • the unit of the source of the time synchronization signal 130 is not limited to the functional unit 200, and may be another unit provided in the control system 1 of FIG.
  • a predetermined trigger signal generator (not shown) provided in the control system 1 of FIG. 1, or any control device 2 (CPU unit 100 or functional unit 200, 300 (see FIG. 5) of the control device 2), or The device / line management device 190 may be used.
  • the time synchronization signal 130 is output periodically, for example, every 1 ms, but the method is not limited to the method of periodically outputting the signal 130. For example, when the counter value of the counter OC1 of the synchronization processing unit 200A of the functional unit 200 becomes equal to a certain indicated value, the unit of the source of the time synchronization signal 130 may output the time synchronization signal 130.
  • the time is acquired from the master clock 191A provided by the TSN, but the acquisition route of the master time for time synchronization is not limited to the TSN.
  • it may be acquired from the master clock 191B of EtherCAT.
  • EtherCAT the master clock 191B is synchronized with the absolute time.
  • counters DC1 and DC2 are used for time synchronization.
  • the synchronization processing unit 200B of the functional unit 200 periodically acquires the time of the master clock 191B after correcting the propagation delay.
  • the synchronization processing unit 200B sets a counter value indicating the acquired time in the counter DC1.
  • the synchronization processing unit 200B periodically reads the counter value of the counter DC1 and transmits it to the data bus 111.
  • the counter DC1 corresponds to the counter 213 (see FIG. 6).
  • the counter DC2 corresponds to the counters 119, 121 and 123 (see FIG. 6) and the counters referred to by the scheduler program 170 in FIG. 9 for scheduling the execution timing of the control program 152 and the like (counter 126 and the like in FIG. 6). To do.
  • the synchronization processing unit 100B of the CPU unit 100 sets the counter value received via the data bus 111 to the counter DC2. After that, the value of the counter DC2 is updated (incremented or decremented) in synchronization with the output of the internal hardware circuit. As a result, the count value of the counter DC2 is periodically updated. Further, when the time synchronization signal 130 is received via the signal line 113, the correction unit 10B of the synchronization processing unit 100B latches the counter value received via the data bus 111, and sets the latch counter value LDC1 as the storage area 10C. Store in. Further, when the correction unit 10B receives the time synchronization signal 130, it latches the counter value of the counter DC2 and stores it in the storage area 10C as the latch counter value LDC2.
  • the adjustment value D used for the correction may include a value determined according to the magnitude of the difference (synchronization deviation) between the latch counter values LDC1 and LDC2.
  • the correction unit 10B detects a tendency of a change (drift-like change) in the difference between the latch counter values LDC1 and LDC2 calculated each time the time synchronization signal 130 is received, and adjusts the above according to the change tendency.
  • a value of value D or "N” may be determined.
  • the value of the adjustment value D or "N” may be determined so that the difference calculated each time the time synchronization signal 130 is received becomes small, that is, the difference converges to a predetermined value.
  • initialization of the counter DC2 may be included by setting the above adjustment value to the value of the counter DC2.
  • the time for performing the correction process may be the same as that of FIG. 10A.
  • the time synchronization signal 130 may be output to the signal line 113 when the counter value of the counter DC1 becomes equal to a certain indicated value.
  • the correction process is not limited to the configuration performed by the correction unit 10B of the CPU unit 100, and may be performed by using the correction unit 20A and the storage unit 20C of the functional unit 200.
  • the synchronization processing unit 100A of the CPU unit 100 periodically transmits the counter value of the counter DC2 to the data bus 111.
  • the correction unit 20A receives the time synchronization signal 130 from the signal line 113, the correction unit 20A performs a latch process.
  • the correction unit 20A latches (acquires) the counter value of the counter OC1 and latches (receives) the counter value of the counter DC2 transmitted via the data bus 111.
  • the counter values latched in this way are stored in the storage unit 20C as latch counter values LOC1 and LDC2.
  • the correction unit 20A calculates the difference in synchronization deviation between the latch counter values LOC1 and LDC2 of the storage unit 20C, determines the adjustment value D (positive value or negative value) so that the difference becomes small.
  • the determined adjustment value D is added to the latch counter value LDC2.
  • the correction unit 20A transfers the added latch counter value to the CPU unit 100 via the data bus 111.
  • the CPU unit 100 sets the received latch counter value after addition in the counter DC2. As a result, the counter value of the counter DC2 of the CPU unit 100 is corrected for synchronization deviation.
  • the correction unit 20B may perform the correction processing of the counter value of the counter DC2 of the CPU unit 100 by using the storage unit 20C.
  • the synchronization processing unit 100B periodically transmits the counter value of the counter DC2 to the data bus 111.
  • the correction unit 20B receives the time synchronization signal 130 from the signal line 113, the correction unit 20B performs a latch process.
  • the correction unit 20B latches (acquires) the counter value of the counter DC1 and latches (receives) the counter value of the counter DC2 transmitted via the data bus 111.
  • the counter values latched in this way are stored in the storage unit 20C as latch counter values LDC1 and LDC2.
  • the correction unit 20B determines an adjustment value D such that the difference in synchronization deviation between the latch counter values LDC1 and LDC2 becomes small, and adds the determined adjustment value D to the latch counter value LDC2.
  • the correction unit 20B transfers the added value to the CPU unit 100 via the data bus 111.
  • the CPU unit 100 sets the received latch counter value LDC2 after addition to the counter DC2. As a result, the counter value of the counter DC2 of the CPU unit 100 is corrected for synchronization deviation.
  • the first timer value (counter value of the counter OC1) indicated by the timer of the first unit (functional unit 200) is shown.
  • the second timer value (timer value of the counter DC2) indicated by the timer of the second unit (CPU unit 100) are acquired via the data line (data bus 111), and the acquired timer is obtained. Based on the value, the synchronization shift between the timer of the first unit and the timer of the second unit is corrected. As a result, the timer (counter DC2) of the second unit (CPU unit 100) can be set to match the timer (counter OC1) of the first unit (functional unit 200).
  • control system 1 may further include a unit 370 different from the CPU unit 100 and the functional unit 200, and cause the unit 370 to perform the correction process described above.
  • the unit 370 can be connected to the signal line 113 and the data bus 111.
  • the unit 370 includes a hardware processor, and the hardware processor executes a program to realize the correction unit 20A (or the correction unit 20B) or the correction unit 371 corresponding to the correction unit 10B.
  • the correction unit 371 reads the counter value from the counter OC1 and the counter DC2 (or the counter DC1 and the counter DC2) via the data bus 111.
  • the correction unit 371 corrects the count value of the counter DC2 by using the read counter value so that the synchronization deviation becomes small as described above.
  • the corrected counter value is set in the counter DC2 via the data bus 111.
  • the correction units 20A and 20B, the correction unit 10B, and the correction unit 371 shown in FIGS. 10A and 10B are examples of the adjusting means.
  • the control device 2 or the control system 1 uses a dedicated hardware circuit (for example, ASIC or FPGA) to perform a part or all of the processing provided by the correction units 20A and 20B, the correction unit 10B, and the correction unit 371. May be implemented.
  • each control device 2 using the time of the master clock 191A (or 191B), (i) time synchronization is realized between the units, and (ii) each unit and a device connected to the unit are realized. Time synchronization is realized between the two, and in the (iii) CPU unit 100, time synchronization for execution of the control program 152, the input program 172, and the output program 174 is realized by the scheduler program 170. Further, when each control device 2 performs time synchronization using the common master clocks 191A and 191B, (iv) time synchronization can be realized between different control devices 2, that is, between different processes.
  • control system 1 is configured to include correction units 20A and 20B, correction units 10B, and correction unit 371, but may be configured to include at least one of these correction units.
  • FIG. 11 is a diagram showing an example of a flowchart of the process according to the present embodiment.
  • FIG. 11 includes a synchronization process and an observation value collection process.
  • the processor 202 of the functional unit 200 performs processing by the synchronization processing unit 200A (or 200B).
  • the processor 202 acquires the time from the master clock 191A (or 191B) and sets the timer value in the counter OC1 (or DC1) (step S1).
  • the processor 202 determines whether it is time to transmit the time synchronization signal 130 (step S3). If it is determined that the time synchronization signal 130 is not the transmission time (NO in step S3), the process returns to step S1, but if it is determined that the transmission time has come (YES in step S3), the signal generator 26 generates the time synchronization signal 130. Output to the signal line 113 (step S5).
  • the processor 202 periodically transmits the counter value of the counter OC1 (or DC1) to the data bus 111 (step S7).
  • the transmission of this counter value is carried out regardless of the transmission of the time synchronization signal 130.
  • the processor 101 performs processing by the synchronization processing unit 100A (or 100B). In the process of FIG. 11, a process of setting the counter OC2 and updating the counter value of the counter DC2 is performed.
  • the processor 101 determines whether to receive the time synchronization signal 130 from the signal line 113 (step S25). While the time synchronization signal 130 is not received (NO in step S25), the process of step S25 is repeated.
  • step S25 When the processor 101 determines that the time synchronization signal 130 has been received (YES in step S25), the processor 101 performs the counter value latch processing described above (step S27). The processor 101 determines whether it is time to perform the correction process by the correction unit 10B (step S29). For example, it is determined whether a predetermined time has elapsed since the time synchronization signal 130 was received. While it is determined that it is not time to perform the correction (NO in step S29), the process of step S29 is repeated.
  • Step S31 When it is time for the processor 101 to perform the correction process, for example, when it is determined that a predetermined time has elapsed since the time synchronization signal 130 was received (YES in step S29), the correction process described above is performed by the correction unit 10B. (Step S31).
  • the correction process includes calculation of the difference between the latched counter values (step S33), determination of the adjustment value D for correction (step S35), and change of the counter value of the counter DC2 using the adjustment value D (step S37). including.
  • the processor 101 collects the observed values and stores them in the time series database 180 (step S41).
  • the processor 101 reads the time-series data 182 of the time-series database 180 and transmits it to the manufacturing execution system 400 or the IoT service providing device on the cloud (step S43).
  • a frame for transmitting the time series data 182 is generated and transmitted in the frame format (step S45).
  • the manufacturing execution system 400 receives a frame of time series data 182 from the control device 2 (step S61) and stores it in the time series DB 450 (step S63).
  • the correction for the time synchronization process is performed in the CPU unit 100, but as described above, the correction for the time synchronization process may be performed in the functional unit 200 in the same manner as in step S31.
  • the functional unit 200 provided the counter value to the CPU unit 100 by periodically transmitting the counter value of the counter OC1 (or the counter DC1) to the data bus 111.
  • the method of providing the counter value to the CPU unit 100 is not limited to this.
  • the CPU 100 refers to (reads) the counter value of the counter OC1 (or counter DC1) of the functional unit 200 via the data bus 111. You may.
  • FIG. 12 is a diagram showing a configuration example of the manufacturing execution system 400 according to the present embodiment.
  • the manufacturing execution system 400 is realized by using hardware (for example, a general-purpose personal computer) that follows a general-purpose architecture.
  • the manufacturing execution system 400 includes a processor 402, a main memory 404, an input unit 406, an output unit 408, a storage 410, an optical drive 412, and a USB controller for communicating with an external device. Includes 420 and a network controller 413 that connects networks 13 and 14. These components are connected via the processor bus 418.
  • the processor 402 is composed of a CPU, a GPU, or the like, reads a program stored in the storage 410, expands it into the main memory 404, and executes it to realize various processes as described later.
  • the main memory 404 is composed of a volatile storage device such as DRAM or SRAM.
  • the storage 410 is composed of, for example, a non-volatile storage device such as an HDD or SSD.
  • the storage 410 in addition to the OS 412 for realizing the basic functions, various programs for providing the functions as the manufacturing execution system 400 are stored.
  • the various programs include a DB management program 411. Further, the storage 410 has an area for storing the time series DB 450.
  • the input unit 406 is composed of a keyboard, a mouse, and the like, and receives user operations on the manufacturing execution system 400.
  • the output unit 408 is composed of a display, various indicators, a printer, and the like, and outputs a processing result from the processor 402 and the like.
  • the manufacturing execution system 400 has an optical drive 412, and from a recording medium 414 (for example, an optical recording medium such as a DVD (Digital Versatile Disc)) that non-transiently stores a computer-readable program, among the recording media 414.
  • a recording medium 414 for example, an optical recording medium such as a DVD (Digital Versatile Disc)
  • the program stored in is read and installed in the storage 410 or the like.
  • FIG. 12 shows a configuration example in which the functions required as the manufacturing execution system 400 are provided by the processor 402 executing the program, and the manufacturing execution system 400 is a part of these provided functions or All may be implemented using a dedicated hardware circuit (eg, ASIC or FPGA).
  • a dedicated hardware circuit eg, ASIC or FPGA
  • FIG. 13 is a diagram showing a DB manager provided by executing the DB management program 411 of FIG.
  • the DB manager 451 provided by executing the DB management program 411 by the processor 402 manages the time-series DB 450 (for example, DB generation, aggregation, editing, analysis, output, etc.). To do.
  • FIGS. 14A and 14B are schematic views showing a processing example when the control device 2 according to the present embodiment transmits time series data to the manufacturing execution system 400.
  • FIGS. 14A and 14B a case where the time synchronization process is not performed (see FIG. 14A) and a case where the time synchronization process is performed (see FIG. 14B) are shown in contrast.
  • FIG. 15 is a diagram schematically showing a frame of time series data and aggregated data generated by the control device 2 according to the present embodiment.
  • FIG. 15A shows a frame for storing the observation values collected by the control device 2B in the process 3B
  • FIG. 15B shows a frame for storing the observation values collected by the control device 2A in the process 3A.
  • FIG. 15 (C) shows an example of a time-series DB 450 that stores observation values aggregated by the DB manager 451.
  • FIG. 14A shows a configuration in which the control devices 2A and 2B are connected to the manufacturing execution system 400 via the upper network 13. In the configuration shown in FIG. 14A, it is assumed that the time synchronization is not performed between the control device 2A and the control device 2B.
  • Each time series data includes the observed values collected by the control devices 2A and 2B and the time associated with each observed value. Conversely, in the configuration shown in FIG. 14A, the control devices 2A and 2B can only add a time as information indicating the collection timing of each observed value. The time is managed by the control devices 2A and 2B, respectively, and the time synchronization is incomplete.
  • the times do not completely match between the time-series data collected by the manufacturing execution system 400, so that the DB manager 451 aggregates (that is, integrates) the respective time-series data at the exact timing. ) Cannot be done.
  • the control device 2A and the control device 2B are provided with the time-synchronized counter described above.
  • the time series data frame transmitted from each of the control device 2A and the control device 2B is associated with the observation values collected in the steps 3A and 3B, and the time 452 indicating the timing of collecting each observation value (for example).
  • the time obtained from the master clock) and the counter value 453 eg, the counter value of the counter DC2 can be included (see (A) in FIG. 15 and (B) in FIG. 15).
  • the DB manager 451 can adjust the timing of the observed values included in the time series data by using the counter value 453 included in the time series data received from each of the control devices 2A and 2B. That is, even if the observed values are collected by different control devices 2 (different processes), they are aggregated and stored in the time series DB 450 with the time axes almost completely matched (see (C) in FIG. 15). , The aggregated data can be used for the analysis of observed values.
  • the signal line and the adjusting means (10B, 20A, 20B) connected to the data line are provided.
  • the adjusting means When the trigger signal (130) is received via the signal line, the timer value is acquired via the data line, and the timer (OC1) of the first unit is notified based on the acquired timer value.
  • a control system that sets the timer (DC2) of the second unit [Structure 2] The control system according to configuration 1, wherein one of the first unit and the second unit transmits the trigger signal to the signal line. [Structure 3] The control system according to the configuration 1 or 2, further comprising a unit (190) for transmitting the trigger signal to the signal line, which is different from the first unit and the second unit. Control system. [Structure 4] The control system according to any one of configurations 1 to 3, wherein the adjusting means is provided in one of the first unit and the second unit. [Structure 5] The control system according to any one of configurations 1 to 4, wherein the control system further includes a unit including the adjusting means, which is different from the first unit and the second unit.
  • the adjusting means When the trigger signal is received via the signal line, the timer value of the timer of the first unit and the timer value of the timer of the second unit are used by using the timer value acquired via the data line. By acquiring the difference between the above and adjusting the timer value of the timer of the second unit using the adjustment value based on the acquired difference, the timer of the second unit is adjusted to the timer of the first unit. , The control system according to any one of configurations 1 to 5. [Structure 7] The adjusting means The control system according to configuration 6, wherein the adjustment value is determined from the tendency of a change in the magnitude of the difference detected each time the trigger signal is received.
  • the control system further A plurality of control devices (2) connected to the first network (11) are provided. Each of the plurality of control devices includes the first unit and the second unit. The control system according to configuration 7, wherein the plurality of control devices synchronize with each other according to a common time received via the first network and a time (191A, 191B) used for synchronization between the timers.
  • the control system further With one or more devices (90) connected to each of the plurality of control devices via a second network (110) lower than the first network.
  • a synchronization timer (101A, 101B, 101C) synchronized with each other among the plurality of control devices is provided.
  • the control system according to configuration 8 wherein the control device and the one or more devices connected to the second network of the control device are synchronized with each other by a timer value of the synchronization timer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Hardware Design (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Programmable Controllers (AREA)

Abstract

ユニット間の時刻同期にかかる処理を簡単化する。制御システムは、各々がタイマを有する第1および第2のユニットと、第1および第2のユニットの間でタイマが示すタイマ値を含むデータを伝送するデータラインと、第1および第2のユニットの間を電気的に接続する信号線と、信号線およびデータラインに接続される調整手段と、を備え、調整手段は、トリガ信号を信号線を介して受信したとき、データラインを介してタイマ値を取得し、取得したタイマ値に基づいて、第1のユニットのタイマに第2のユニットのタイマを合わせる。

Description

制御システム
 本開示は、FA(Factory Automation)の制御システムに関する。
 様々な生産現場において、PLC(プログラマブルロジックコントローラ)などの制御装置を用いたFA技術が広く普及している。このような制御装置は、1または複数の機器との間でバスまたはネットワークを介してデータを送受信する。
 制御システムの高機能化に伴って、互いに独立した制御処理を実行する複数の制御装置がネットワークを介して接続されるような構成も実現しつつある。例えば、特開2015-118505号公報(特許文献1)には、コントローラレベルネットワークに複数の制御装置が接続された制御システムが開示される。複数の制御装置の各々には、デバイスレベルネットワークを介して複数の入出力装置が接続されている。各制御装置は、複数の入出力装置から取得した入力値を、コントローラレベルネットワークを介してサーバに送信する。
 また、特開2014-146877号公報(特許文献2)では、第1の通信装置と第2の通信装置とは、PCIeケーブルIFにより接続される。時刻同期の補正量演算に関して、第1の通信装置から第2の通信装置へ時刻要求パケットが伝送され、また、第2の通信装置から第1の通信装置へ時刻応答パケットが伝送される。
特開2015-118505号公報 特開2014-146877号公報
 特許文献1では、複数の制御装置は互いに独立した制御処理を実行するため、1つの制御装置と別の制御装置との間では、機器において収集または生成されたデータ(入力データ)を収集するタイミングまたは機器に対する指令などのデータ(出力データ)を対象の機器へ送信するタイミングを互いに同期させることができない。
 また、上記1の制御装置に接続される機器と、上記別の制御装置に接続される機器とを連係して動作させるためには、これらの制御装置間でそれぞれの機器の情報を遣り取りする必要があるが、入力データが収集されるタイミングまたは出力データが出力されるタイミングを互いに同期させることができないため、複数の機器の間で制御タイミングを同期させることが困難となる。
 特許文献2では、このようなタイミングの同期に関して、時刻同期の補正量を演算する手段を提供するが、時刻同期の手順として時刻要求パケットおよび時刻応答パケットの遣り取りが必要とされる。したがって、同期手順が複雑であり、またパケットの通信時間および補正を含めた時刻同期の処理に時間がかかる。
 本開示の1つの目的は、ユニット間の時刻同期にかかる処理を簡単化し、また処理にかかる時間を短くする構成を提供することである。
 本開示の一例に係るファクトリオートメーション用の制御システムは、各々がタイマを有する第1のユニットおよび第2のユニットと、第1のユニットと第2のユニットとの間で、上記のタイマが示すタイマ値を含むデータを遣り取りするためのデータラインと、第1のユニットと第2のユニットとを電気的に接続する信号線と、信号線およびデータラインに接続される調整手段と、を備え、調整手段は、トリガ信号を信号線を介して受信したとき、データラインを介してタイマ値を取得し、取得したタイマ値に基づいて、第1のユニットのタイマに第2のユニットのタイマを合わせる。
 この開示によれば、ユニット間のタイマを合わせるという時刻同期にかかる調整を、トリガ信号を契機に実施させることができる。また、調整手段は、トリガ信号が与えられるときにユニット間のデータラインを伝送されるタイマ値を取得し、取得されたタイマ値に基づき第1のユニットのタイマに第2のユニットのタイマを合わせる。
 したがって、タイマを合わせる時期をトリガ信号により簡単に決定することができる。また、調整手段は、データラインを伝送されるタイマ値を用いることでタイマを合わせることができる。これにより、タイマを合わせるという時刻同期のために、ユニット間でタイマ値の要求/応答の通信セッションをする必要はないので、その分、タイマ合わせに係る時間を短縮できる。
 上述の開示において、第1のユニットおよび第2のユニットのうちの一方が、トリガ信号を信号線に伝送する。
 この開示によれば、トリガ信号の伝送元は、第1のユニットおよび第2のユニットのいずれであってもよい。したがって、第1のユニットおよび第2のユニットのどちらか一方が、補正処理を実施する時期を決定することができる。
 上述の開示において、制御システムは、さらに、トリガ信号を信号線に伝送するユニットであって、第1のユニットおよび第2のユニットとは異なるユニットを備える。
 この開示によれば、第1のユニットおよび第2のユニットとは異なる別ユニットに、トリガ信号の伝送を実施させることができる。
 上述の開示において、調整手段は、第1のユニットおよび第2のユニットのうちの一方に備えられる。
 この開示によれば、第1のユニットおよび第2のユニットのどちらか一方に、タイマを合わせるという時刻同期のための処理を実施させることができる。
 上述の開示において、制御システムは、さらに、調整手段を備えるユニットであって、第1のユニットおよび第2のユニットとは異なるユニットを備える。
 この開示によれば、第1のユニットおよび第2のユニットとは異なる別ユニットに、タイマを合わせるという時刻同期のための処理を実施させることができる。したがって、当該処理に係る負荷を、第1のユニットおよび第2のユニットに与えることが回避される。
 上述の開示において、調整手段は、トリガ信号を信号線を介して受信したとき、データラインを介して取得したタイマ値を用いて、第1のユニットのタイマのタイマ値と第2のユニットのタイマのタイマ値との差を取得し、取得した差に基づく調整値を用いて、第2のユニットのタイマのタイマ値を調整することにより、第1のユニットのタイマに第2のユニットのタイマを合わせる。
 この開示によれば、第1のユニットのタイマのタイマ値と第2のユニットのタイマのタイマ値との差である同期ずれの大きさに基づき、タイマを合わせるという時刻同期のための調整に用いる調整値を決定できる。例えば、同期ずれが大きいほど調整値を大きくする調整を実施することができる。
 上述の開示において、調整手段は、トリガ信号を受信する毎に検出される上記の差の大きさの変化の傾向から、調整値を決定する。
 この開示によれば、上記の差が示す同期ずれの大きさの変化の傾向に基づき、調整値を決定できる。例えば、同期ずれが大きくなる傾向にあるときは、調整値を大きくする調整を実施することができる。
 上述の開示において、制御システムは、さらに、第1のネットワークに接続される複数の制御装置を備え、複数の制御装置の各々は、第1のユニットおよび第2のユニットを含み、複数の制御装置は、第1のネットワークを介して受信する共通の時刻であってタイマ間の同期に用いる時刻により互いに同期する。
 この開示によれば、第1のユニットおよび第2のユニットを含む制御装置間でお互いに時刻を同期させることができ、また各制御装置においてはユニット間で当該時刻に同期すするタイマを用いて同期させることができる。したがって、各制御装置と各制御装置が備える各ユニットとをお互いに同期させることができる。
 上述の開示において、制御システムは、さらに、第1のネットワークよりも下位の第2のネットワークを介して、複数の制御装置の各々に接続される1または複数の機器と、複数の制御装置の間で互いに同期された同期タイマとを備え、制御装置と、当該制御装置の第2のネットワークに接続される1または複数の機器は、同期タイマのタイマ値により互いに同期する。
 したがって、各制御装置と各制御装置が備える各ユニットと各制御装置に接続される各機器とを、お互いに同期させることができる。
 本開示によれば、ユニット間の時刻同期にかかる処理を簡単化し、また処理にかかる時間を短くする。
本実施の形態に係る制御システム1の適用場面の一例を示す模式図である。 本実施の形態に従う制御システム1の全体構成の一例を示す模式図である。 本実施の形態に従う制御システム1のネットワーク構成例を示す模式図である。 本実施の形態に従う制御システム1のデータ通信処理を示す模式図である。 本実施の形態に係る制御装置2のユニットの構成例を示す模式図である。 本実施の形態に係る制御装置2に含まれるCPUユニット100のハードウェア構成例を示すブロック図である。 本実施の形態に係る制御装置2に含まれる機能ユニット200のハードウェア構成例を示すブロック図である。 本実施の形態に係る制御装置2に含まれる機能ユニット300のハードウェア構成例を示すブロック図である。 本実施の形態に係るCPUユニット100のソフトウェア構成例を示すブロック図である。 本実施の形態に係る制御装置2が管理する時刻同期のための構成の一例を模式的に示す図である。 本実施の形態に係る制御装置2が管理する時刻同期のための構成の一例を模式的に示す図である。 本実施の形態に係る処理のフローチャートの一例を示す図である。 本実施の形態に係る製造実行システム400の構成例を示す図である。 図12のDB管理プログラム411が実行されることで提供されるDBマネージャーを示す図である。 本実施の形態に係る制御装置2が製造実行システム400に時系列データを送信する場合の処理例を示す模式図である。 本実施の形態に係る制御装置2が製造実行システム400に時系列データを送信する場合の処理例を示す模式図である。 本実施の形態に係る制御装置2において生成される時系列データのフレームを模式的に示す図である。
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。
 <A.適用例>
 図1を参照して、本発明が適用される場面の一例について説明する。図1は、本実施の形態に係る制御システム1の適用場面の一例を示す模式図である。本実施の形態に係る制御システム1は、ファクトリオートメーション用の制御システムであり、複数の制御装置2A,2B,2Cを備える。各制御装置は、フィールド機器90(90A、90B、90C、90D、90E、90F、90I)を含む任意の制御対象(例えば、製造装置や設備)を制御する。各制御装置は、同様の構成を備えるので、制御装置2Aを代表して説明する。
 制御システム1では、各制御装置2Aは、各々がタイマを有するCPUユニット100および機能ユニット200と、CPUユニット100と機能ユニット200との間でデータを遣り取りするためのデータバス111と、CPUユニット100と機能ユニット200とを電気的に接続する信号線113とを備える。機能ユニット200のカウンタOC1が示すタイマ値およびCPUユニット100のカウンタDC2が示すタイマ値を用いて、時刻同期が実施される。
 具体的には、例えば起動時は、機能ユニット200は、マスタクロック191Aから取得した絶対時刻を取得し、取得した絶対時刻に同期した値をカウンタOC1に設定する。カウンタ値OC1の値が、データバス111を介してCPUユニット100に伝送されて、CPUユニット100では、カウンタ値OC1の値であるタイマ値がカウンタDC2に設定される。以降は、CPUユニット100はカウンタDC2の値を内部のハードウェア回路の出力を用い周期的に更新(インクリメントまたはデクリメント)する。
 起動後は、機能ユニット200は、定期的に、マスタクロック191Aから取得する絶対時刻に基づきカウンタOC1の値を更新する。機能ユニット200は、カウンタOC1の値であるタイマ値を、データバス111を介して周期的に伝送する。
 トリガ信号が信号線113を介して与えられると、時刻を同期させるための補正処理が実施される。具体的には、CPUユニット100は、信号線113を介して時刻同期信号を受信すると、データバス111を伝送されるカウンタOC1が示すタイマ値をラッチ(受信)し、およびCPUユニット100のカウンタDC2が示すタイマ値を取得(ラッチ)する。CPUユニット100は、これら取得したタイマ値に基づいて、機能ユニット200のタイマ(カウンタOC1)にCPUユニット100のタイマ(カウンタDC2)を合わせる。つまり、CPUユニット100は、当該取得した両方のタイマ値の差、すなわち時刻同期のずれを算出し、算出された同期ずれを小さくするように、カウンタDC2の値を補正する。本実施の形態では、タイマ値またはカウンタ値の補正は、時刻同期ずれを小さくするようなタイマ値の調整を含む概念である。
 これにより、例えば機能ユニット200またはCPUユニット100が備えるハードウェア回路の誤差などに起因して同期ずれが生じるとしても、カウンタDC2の値を、カウンタOC1の値、すなわちマスタクロック191Aに時刻同期させること可能となる。
 また、各制御装置2においては、カウンタDC2のタイマ値は、フィールド機器90等の各種デバイスを制御するための制御プログラム、およびフィールド機器90とネットワーク110を介してデータを遣り取りするための入出力プログラム等のスケジューリングのために参照される。したがって、各制御装置2では、このようなスケジューリングを、マスタクロック191Aに時刻同期したカウンタDC2のタイマ値に同期させて実施することができる。
 各制御装置2では、ユニット間の時刻同期にかかる補正処理を、トリガ信号を契機に実施することができる。トリガ信号としての時刻同期信号は、例えば周期的に伝送されることで、カウンタDC2の値を、同期ずれをなくす(または小さくする)よう補正するための補正処理を周期的に実施することが可能となる。
 上記に述べたように、制御装置2A,2Bおよび2Cは、時刻同期されたカウンタOC1とカウンタDC2を有している(図中の時刻同期(2)に相当)。
 カウンタOC1は共通のタイマ191Aに時刻同期するから、複数の制御装置2A,2Bおよび2Cの間で、互いに時刻同期させることができる(図中の時刻同期(1)に相当)。また、制御装置2A,2Bおよび2Cの各々が備えるカウンタDC2は、ネットワーク110を介して接続される1または複数のフィールド機器90が有するタイマ91A、91B、91C、91D、91E、91F、91G、91H、91I(以下、タイマ91A~91Iと総称する)と時刻同期している。この結果、制御装置2A,2Bおよび2Cとフィールド機器90A~90Iは互いに時刻同期する(図中の時刻同期(3)に相当)。これにより、制御システム1全体の機器を、互いにマスタクロック191Aの時刻に同期させることが可能となる。
 以下、本実施の形態のより具体的な応用例について説明する。
 以下の説明においては、「制御装置」の典型例として、PLC(プログラマブルコントローラ)を具体例として説明するが、PLCの名称に限定されることなく、本明細書に開示された技術思想は、任意の制御装置に対して適用可能である。また、PLC(制御装置)を含むシステム全体を、以下では「制御システム」とも称する。
 <B.制御システムの全体構成>
 まず、本実施の形態に従うFA(Factory Automation:ファクトリオートメーション)に適用され得る制御システムの全体構成について説明する。図2は、本実施の形態に従う制御システム1の全体構成の一例を示す模式図である。
 図2を参照して、制御システム1では、ネットワークが複数レベルに接続されており、各レベルのネットワークには、それぞれ異なる機能が割り当てられる。具体的には、限定されないが、例えば4つのレベルのネットワーク11~14が設けられている。
 ネットワーク11は、コントロールレベルのネットワークである。ネットワーク11は、複数の制御装置2A、2Bおよび2C(以下、「制御装置2」と総称することもある。)と、装置/ライン管理装置190よびSCADA(Supervisory Control And Data Acquisition)機能を提供する表示装置280とが接続されており、ネットワーク11では装置間でデータを遣り取りできるデータリンクが形成される。装置/ライン管理装置190および表示装置280は、ネットワークに接続される装置および生産ラインを管理する機器に相当する。ネットワーク11は、主として、制御系に係る情報の伝送を主たる機能として提供する。
 制御装置2には、センサ、アクチュエータといった各種のフィールド機器90が接続される。これらのフィールド機器90は、制御装置2に装着される入出力ユニットを介して制御装置2に直接接続される場合もあるが、ネットワーク110を介して制御装置2に接続されることもある。図2に示す構成例においては、制御装置2は、1または複数のネットワーク110に接続される。各ネットワーク110には、1または複数のフィールド機器90が接続される。1または複数のフィールド機器90の各々は、製造装置または生産ラインなど(以下、「フィールド」とも総称する。)に対して何らかの物理的な作用を与えるアクチュエータ、およびフィールドとの間で情報を遣り取りする入出力装置などを含む。したがって、図2に示す制御システム1には、ネットワーク11~14の4つのレベルに加えて、フィールドレベルのネットワーク110がさらに追加されることになる。
 ネットワーク110を介して、制御装置2とフィールド機器90との間で遣り取りされるデータは、数100μsecオーダ~数10msecオーダのごく短い周期で更新されることになる。なお、このような遣り取りされるデータの更新処理は、入出力リフレッシュ処理とも称される。
 ネットワーク12は、管理レベルのネットワークとして提供される。ネットワーク12には、装置およびラインを管理する装置/ライン管理装置190、製造計画等を管理する製造管理装置380および390が接続される。装置/ライン管理装置190、製造管理装置380および390は、ネットワーク12を介して、製造計画等の管理情報の遣り取り、および装置またはラインの情報を遣り取りする。
 ネットワーク13は、コンピュータレベルのネットワークとして提供される。ネットワーク13には、製造管理装置380および390、ならびに時系列DB(データベースの略)450を管理する製造実行システム(EMS:Manufacturing Execution System)400が接続される。製造管理装置380および390、ならびに製造実行システム400は、ネットワーク13を介して、生産管理および情報系のデータを遣り取りする。
 製造実行システム400は、ネットワーク13を介して収集するフィールド機器90からの入力値である観測値を、観測された順番に従う時系列のデータとして時系列DB450に格納する。
 具体的には、本実施の形態では、制御装置2は、指定された観測値を含むフレームを生成する機能を有する。制御装置2は、生成されるフレームをネットワーク11,12および13を介して製造実行システム400に転送する。製造実行システム400は、制御装置2から受信した観測値のフレームを時系列に従い時系列DB450に格納する。
 本実施の形態では、時系列DB450に格納されるデータを「時系列データ」とも称す。本実施の形態において、「時系列データ」は、任意の対象についてのデータ(観測値)の時間的な変化を連続的(あるいは、一定間隔をおいて不連続)に観測して得られる一連の値を意味する。
 本明細書において「観測値」は、制御装置2での制御演算において利用可能な値(実値)を総称する概念であり、典型的には、制御対象から取得されて制御演算に入力される値(フィールドから取得された測定値など)、取得された入力値に基づいて制御演算によって決定される制御対象に対する出力値(フィールドへ与えられる指令値など)、制御演算の過程において算出される演算値(任意の変数値)などを含み得る。すなわち、「観測値」は、制御装置2においてデータとして格納できる、あるいは、制御装置2からデータとして外部出力できる任意の値を包含するものである。
 ネットワーク14は、インターネットなどの外部ネットワークを含む。ネットワーク14には、製造実行システム400とクラウド上の外部装置などが接続される。製造実行システム400は、クラウド上の装置とデータを遣り取りすることにより、時系列DB450のデータをクラウド上の装置に転送する。
 制御装置2は、サポート装置500が接続され得る。サポート装置500は、制御装置2が制御対象を制御するために必要な準備を支援する装置である。
 制御システム1のネットワーク11に接続される制御装置2A、2Bおよび2Cは、それぞれ、異なる工程3A、3Bおよび3Cに備えられる。限定されないが、例えば、工程3Aは製品(ワーク)の組立工程を示し、工程3Bは組立てられた製品の塗装工程を示し、工程3Cが塗装された製品の検査工程を示す。
 図2に示す制御システム1において、ネットワーク12およびそれ以下のレベルにあるネットワーク11およびネットワーク110は、「ファクトリーネットワーク」とも称され、機器を現実に制御するためのデータ(以下、「制御系データ」と総称することもある)を遣り取りする制御系通信を提供する。一方、ネットワーク13およびそれ以上のレベルにあるネットワーク14は、「コーポレートネットワーク」とも称され、生産ライン/工場での生産活動などを監視・管理・制御するためのデータ(以下、「情報系データ」と総称することもある)を遣り取りする情報系通信を提供する。
 ネットワーク11~14およびネットワーク110には、このような要求される特性の違いに応じたプロトコルおよびフレームワークが採用される。例えば、ファクトリーネットワークに属するネットワーク11および12のプロトコルとしては、汎用的なEthernet(登録商標)上に制御用プロトコルを実装した産業用オープンネットワークであるEtherNet/IP(登録商標)を用いてもよい。また、ネットワーク110のプロトコルとしては、マシンコントロール用ネットワークの一例であるEtherCAT(登録商標)を採用してもよい。なお、ネットワーク11のプロトコル(第1のプロトコル)とネットワーク110のプロトコル(第2のプロトコル)とは、同じであってもよいし、異なっていてもよい。このようなマシンコントロールに適したネットワーク技術を採用することで、機器間の伝送に要する時間が保証されたリアルタイム性を提供できる。
 これに対して、コーポレートネットワークに属するネットワーク13および14のプロトコルとしては、接続先の多様性を担保するために、汎用的なEthernetなどが用いられる。汎用的なEthernetを採用することで、送信可能なデータ量などの制限を排除できる。
 <C.制御システム1における時刻同期>
 図1に示すファクトリーネットワークにおいては、ネットワーク11に接続される複数の制御装置2A,2Bおよび2Cの各々は、ネットワーク110を介して接続される1または複数のフィールド機器90とのデータを送受信する。具体的には、制御装置2は、フィールド機器90において収集または生成されたデータ(入力データ)を収集する処理(入力処理)、フィールド機器90に対する指令などのデータ(出力データ)を生成する処理(演算処理)および、生成した出力データを対象のフィールド機器90へ送信する処理(出力処理)などを実行する。
 ネットワーク110では、データの到着時間が保証される必要がある。そのため、制御装置2は、データ伝送のタイミングを規定する、データが送受信される主体(すなわち、1または複数のフィールド機器90)の間で互いに時刻同期されたタイマを有している。
 しかしながら、複数の制御装置2の間で時刻同期がとれていない場合には、例えば、1つの制御装置2に接続されるフィールド機器90と、別の制御装置2に接続されるフィールド機器90との間は時刻同期させることができない。その結果、入出力リフレッシュ処理のタイミングが一致しない場合が生じ得るため、互いに異なる制御装置2に接続される複数のフィールド機器90を連係して動作させることが困難となる。
 そこで、本実施の形態に従う制御システム1においては、複数の制御装置2の各々が有するタイマを互いに時刻同期させる。これにより、互いに異なる制御装置2に接続される、すなわち異なる工程間において複数のフィールド機器90の協調制御を実現する。
 以下、本実施の形態に係る制御システム1が提供する時刻同期機能について説明する。
 (c1.ネットワーク構成例)
 次に、本実施の形態に従う制御システム1のネットワーク構成例について説明する。図3は、本実施の形態に従う制御システム1のネットワーク構成例を示す模式図である。
 図3に示す制御システム1は、複数の制御装置2A,2Bおよび2Cと、複数のフィールド機器90A~90Iとを備える。制御システム1は、一例として、少なくとも一部の制御装置がデイジーチェーン接続のネットワークを採用する。制御装置2A,2Bおよび2Cの各々は、対応するネットワーク110内のデータ伝送を管理するマスタとして機能する。フィールド機器90A~90Iは、対応するマスタからの指令に従ってデータ伝送を行なうスレーブとして機能する。
 制御装置2A,2Bおよび2Cは、コントロールレベルのネットワーク11(上位のネットワーク)に接続されている。ネットワーク11には、例えば装置/ライン管理装置190が接続されている。
 制御装置2Aに接続されるネットワーク110には、フィールド機器90A、90B、90Cがデイジーチェーンで順次接続されており、制御装置2Bに接続されるネットワーク110には、フィールド機器90D、90E、90Fがデイジーチェーンで順次接続されており、制御装置2Cに接続されるネットワーク110には、フィールド機器90G、90H、90Iがデイジーチェーンで順次接続されている。
 ネットワーク110内において、制御装置2および1または複数のフィールド機器90は、いずれもデータ伝送機能を有する通信装置とみなすことができる。図3に示す例においては、制御装置2および1または複数のフィールド機器90の各々は、隣接して接続されているある通信装置から、ネットワーク上を伝送されるデータを受信すると、当該データを必要に応じて、隣接して接続されている別の通信装置へ伝送する機能を有している。
 本実施の形態に従う制御システム1において、ネットワーク110に接続される複数の通信装置、すなわち制御装置2および1または複数のフィールド機器90の間では、送受信タイミングが同期されている(図中の時刻同期(3)に相当)。具体的には、制御装置2および1または複数のフィールド機器90の各々は、互いに時刻同期されたタイマ(あるいは、同期してインクリメントまたはデクリメントされるカウンタ)を備える。制御装置2および1または複数のフィールド機器90の各々は、それらの時刻同期されたタイマまたはカウンタに従って、データの送信または受信のタイミングを決定する。
 なお、本実施の形態では「タイミング」は何らかの事象が生じる時期、時間または時刻の概念を表す。また、「時刻同期」とはお互いが有するタイマ,時間データ等を同期させることを示す。
 図3に示す例においては、タイマ101A、101Bおよび101Cは、それぞれ、カウンタOC1(図1参照)に対応し、タイマ102A、102Bおよび102Cは、それぞれ、カウンタDC2(図1参照)に対応している。図3を参照して、図1に示した時刻同期(1)、(2)および(3)をより具体的に説明する。
 制御装置2Aはタイマ102Aを備え、フィールド機器90A、90B、90Cはそれぞれタイマ91A、91B、91Cを備える。制御装置2Aのタイマ102Aがマスタとして機能し、フィールド機器90A、90B、90Cのタイマ91A、91B、91Cがこのマスタを基準としてタイミングを同期させる。例えば、タイマ102Aのタイマ値に基づく値が、タイマ91A、91B、91Cに設定される。
 制御装置2Bはタイマ102Bを有しており、フィールド機器90D、90E、90Fはタイマ91D、91E、91Fをそれぞれ有している。制御装置2Bのタイマ102Bがマスタとして機能し、フィールド機器90D、90E、90Fのタイマ91D、91E、91Fがこのマスタを基準としてタイミングを同期させる。例えば、タイマ102Bのタイマ値に基づく値が、タイマ91D、91E、91Fに設定される。
 制御装置2Cはタイマ102Cを有しており、フィールド機器90G、90H、90Iはタイマ91G、91H、91Iをそれぞれ有している。制御装置2Cのタイマ102Cがマスタとして機能し、フィールド機器90G、90H、90Iのタイマ91G、91H、91Iがこのマスタを基準としてタイミングを同期させる。例えば、タイマ102Cのタイマ値に基づく値が、タイマ91G、91H、91Iに設定される。
 すなわち、制御装置2A,2Bおよび2Cの各々は、対応のネットワーク110内のデータ伝送を管理するマスタとして機能し、各制御装置2に接続されるフィールド機器90は、マスタからの指令に従ってデータ伝送を行なうスレーブとして機能する。マスタとスレーブとの間でタイマを互いに時刻同期させることにより、ネットワーク110を構成する制御装置2とフィールド機器90との間でデータの伝送タイミングなどを互いに一致させることができる。
 図3に示す例において、制御装置2Aは、さらに、タイマ102Aと時刻同期されたタイマ101Aを有している。制御装置2Bは、さらに、タイマ102Bと時刻同期されたタイマ101Bを有している。制御装置2Cは、さらに、タイマ102Cと時刻同期されたタイマ101Cを有している(図中の時刻同期(2)に相当)。制御システム1においては、例えば、タイマ101A、101Bおよび101Cのいずれかを、制御システム1全体のマスタとして機能させることができる。
 一例として、図3では、制御装置2Aのタイマ101Aがマスタに設定され、制御装置2B,2Cのタイマがこのマスタに時刻同期する。これにより、複数の制御装置2A,2Bおよび2Cの間で、互いに時刻同期させることができる(図中の時刻同期(1)に相当)。
 このように、複数の制御装置2A,2Bおよび2Cの各々は、複数の制御装置2A,2Bおよび2Cの間で互いに時刻同期された装置間タイマ(タイマ101A、101Bおよび101C)と、ネットワーク110を介して接続される1または複数のフィールド機器90と時刻同期された機器間タイマ(タイマ102A、102Bおよび102C)とを有しており、装置間タイマと機器間タイマとは互いに時刻同期している。この結果、制御装置2Aおよびフィールド機器90A、90B、90Cの間で時刻同期された機器間タイマ(タイマ102A)と、制御装置2Bおよびフィールド機器90D、90E、90Fの間で時刻同期された機器間タイマ(タイマ102B)と、制御装置2Cおよびフィールド機器90G、90H、90Iの間で時刻同期された機器間タイマ(タイマ102C)とが互いに時刻同期することになる。
 なお、図2には、いずれかの制御装置2のタイマをマスタとして設定する構成例について説明したが、ネットワーク11を介して外部から取得する時刻をマスタとしてもよく、または装置/ライン管理装置190などの外部装置のタイマをマスタとしてもよい。
 (c2.時刻同期したデータ通信)
 図4は、本実施の形態に従う制御システム1のデータ通信処理を示す模式図である。図4を参照して、ネットワーク110に接続される制御装置2Aと複数のフィールド機器90A~90Cとの間では、予め定められたシステム周期に従って、データが遣り取りされる。
 制御装置2Bと複数のフィールド機器90D~90Fとの間、および、制御装置2Cと複数のフィールド機器90G~90Iとの間においても、システム周期に従って、データが遣り取りされる。このようなデータの遣り取りによって、制御装置2およびフィールド機器90の制御動作が実現される。以下の説明では、ネットワーク110上の通信を「下位ネットワーク(NW)通信」とも称する。
 上位のネットワーク11に接続される制御装置2A,2Bおよび2Cの間では、予め定められたシステム周期に従って、各制御装置2が入力処理によってフィールド機器90から収集したデータ、演算処理によって生成した出力データなどが遣り取りされる。このようなデータの遣り取りによって、制御装置2Aに接続されるフィールド機器90、制御装置2Bに接続されるフィールド機器90および制御装置2Cに接続されるフィールド機器90を連係して動作させることができる。すなわち、異なる工程間でフィールド機器90を連係して動作させることができる。以下の説明では、ネットワーク11上の通信を「上位のネットワーク(NW)通信」とも称する。
 本実施の形態に従う制御システム1においては、下位ネットワーク通信におけるデータの伝送を開始すべきタイミングは、複数の制御装置2A,2Bおよび2Cの間で互いに時刻同期されているタイマに基づいて決定される。これにより、複数の制御装置2A,2Bおよび2Cの間では、フィールド機器90との間でデータを遣り取りするタイミングなどを互いに一致させることができるため、結果的に、異なる工程間でフィールド機器90の制御タイミングを同期させることができる。
 <D.制御装置2の構成と時刻同期>
 図5は、本実施の形態に係る制御装置2のユニットの構成例を示す模式図である。図5を参照して、制御システム1が備える制御装置2は、CPU(Central Processing Unit)のユニット100(以下、CPUユニット100と称する)、1または複数の機能ユニット200、および1または複数の機能ユニット300を含む。図5では、制御装置2が備える機能ユニット300は4台としているが、1台または2台以上であってよく、また制御装置2が備える機能ユニット200は1台としているが、2台以上であってよい。CPUユニット100は、1または複数の機能ユニット200を、データバス111と信号線113を介して接続する。また、CPUユニット100は、1または複数の機能ユニット300を、データバス112を介して接続する。
 データバス111は、限定されないが、例えばPCIe(PCI Express(ピーシーアイエクスプレス))に従うI/Oシリアルインタフェースのバスである。信号線113は、光ファイバケーブルまたは電気的な信号ケーブルであり、トリガ信号である時刻同期信号130を伝送する。
 CPUユニット100は、制御対象に応じて作成されたプログラムを実行するプログラム実行部を有している。より具体的には、CPUユニット100は、システムプログラムおよび各種のユーザプログラムを実行する演算処理部に相当する。
 機能ユニット200は、通信処理または情報処理を実施する。機能ユニット200は、データバス111を接続するインターフェイスおよび信号線113を接続する信号ポート212Pを備える。機能ユニット200はネットワーク11と制御装置2との間を仲介するように配置されることで、CPUユニット100は、機能ユニット200を介して、ネットワーク11に接続されたデバイスとの間でデータ通信を行うことができる。また、CPUユニット100の信号ポート110Pと機能ユニット200の信号ポート212Pとの間に信号線113が接続されることで、CPUユニット100および機能ユニット200は信号線113を介して時刻同期信号130を受信する。
 本実施の形態において、機能ユニット200は、CPUユニット100に対するネットワーク14等のインターネットからのアクセス、および、ネットワーク11内の他の装置からのCPUユニット100に対するアクセスを監視するとともに、何らかのセキュリティ事象の発生を検知すると、制御装置2の内部または外部へ当該検知したセキュリティ事象に係る通知を行う。なお、機能ユニット200が実施する情報処理は、セキュリティ監視処理に限定されない。
 機能ユニット300は、フィールド機器90等の制御対象の設備および装置、ならびに、それらに配置されている各種デバイス(センサやアクチュエータなど)との間で信号を遣り取りする、いわゆるI/Oユニットの機能を備える。具体的には、機能ユニット300は、CPUユニット100において算出される指令値をフィールドへ出力、あるいは、フィールドからの入力値を収集する。機能ユニット300としては、例えば、制御対象からのデジタル信号を受取るDI(Digital Input)モジュール、制御対象に対してデジタル信号を出力するDO(Digital Output)モジュール、制御対象からのアナログ信号を受取るAI(Analog Input)モジュール、制御対象に対してアナログ信号を出力するAO(Analog Output)モジュールのうち1または複数のモジュールを有している。さらに、機能ユニット300としては、PID(Proportional Integral Derivative)制御やモーション制御といった特殊機能を実装したコントローラを含み得る。
 機能ユニット200または機能ユニット300は、CPUユニット100に対して、着脱自在に外付けされ得る拡張ユニットとして提供され得る。
 (d1.CPUユニット100の構成)
 図6は、本実施の形態に係る制御装置2に含まれるCPUユニット100のハードウェア構成例を示すブロック図である。
 CPUユニット100は、プロセッサ102と、チップセット104と、主記憶装置106と、二次記憶装置108と、上位のネットワークコントローラ105と、USB(Universal Serial Bus)コントローラ107と、メモリカードインターフェイス114と、ローカルバスコントローラ120,122と、フィールドネットワークコントローラ118と、カウンタ126と、RTC(Real Time Clock)128と、信号ポート110Pを含む。
 プロセッサ102は、CPU、MPU(microprocessor unit)、GPU(Graphics Processing Unit)などで構成され、二次記憶装置108に格納された各種プログラムを読出して、主記憶装置106に展開して実行することで、制御対象に応じた制御、および、後述するような各種処理を実現する。二次記憶装置108は、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)などの不揮発性記憶装置などで構成される。主記憶装置106は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成される。
 チップセット104は、プロセッサ102と各デバイスを制御することで、CPUユニット100全体としての処理を実現する。
 二次記憶装置108には、基本的な機能を実現するためのシステムプログラムに加えて、制御対象の製造装置や設備に応じて作成されるユーザプログラムが格納される。さらに、二次記憶装置108には、後述するような時系列データベースも格納される。
 上位のネットワークコントローラ105は、上位のネットワーク11を介して、製造実行システム400またはクラウド上の装置(図1参照)などとの間のデータを遣り取りする。USBコントローラ107は、USB接続を介してサポート装置500との間のデータの遣り取りを制御する。
 メモリカードインターフェイス114は、メモリカード116を着脱可能に構成されており、メモリカード116に対してデータを書込み、メモリカード116から各種データ(ユーザプログラムやトレースデータなど)を読出すことが可能になっている。
 カウンタ126は、CPUユニット100における各種処理の実行タイミングを管理するための時刻基準として用いられる。カウンタ126は、典型的には、所定周期毎にカウンタ値をインクリメントまたはデクリメントする。CPUユニット100は、カウンタ126として、プロセッサ102を駆動するシステムバス上に配置された、ハードウェアタイマーである高精度イベントタイマー(HPET:High Precision Event Timer)などを用いて実装してもよいし、あるいは、ASIC(Application Specific Integrated Circuit)やFPGA(Field-Programmable Gate Array)などの専用回路を用いて実装してもよい。
 RTC128は、計時機能を有する一種のカウンタであり、現在時刻をプロセッサ102などへ提供する。
 ローカルバスコントローラ122は、CPUユニット100に接続され得る機能ユニット300-1,300-2,…との間でデータを遣り取りするインターフェイスである。ローカルバスコントローラ122は、データバス112を介して接続される他のデバイスである、機能ユニット300-1,300-2,…との間でタイミングを管理するための時刻基準として用いられるカウンタ123を有している。同様に、機能ユニット300-1,300-2,…の各々も、ローカルバスコントローラ122および他の機能ユニット300との間でタイミングを管理するための時刻基準として用いられるカウンタ125を有している。カウンタ123およびカウンタ125については、上述のカウンタ126と同様の構成を採用できる。
 フィールドネットワークコントローラ118は、ネットワーク110を介したフィールド機器90を含む他のデバイスとの間のデータの遣り取りを制御する。フィールドネットワークコントローラ118は、他のデバイスとの間でタイミングを管理するための時刻基準として用いられるカウンタ119を有している。
 ローカルバスコントローラ120は、CPUユニット100に接続され得る機能ユニット200-1,200-2,…との間でデータを遣り取りするインターフェイスである。ローカルバスコントローラ120は、データバス111を介して接続される他のデバイスである、機能ユニット200-1,200-2,…との間でタイミングを管理するための時刻基準として用いられるカウンタ121を有している。同様に、機能ユニット200-1,200-2,…の各々も、ローカルバスコントローラ120との間でタイミングを管理するための時刻基準として用いられるカウンタ213を有している。カウンタ121およびカウンタ213は上述のカウンタ126と同様の構成を採用できる。
 また、ネットワーク110上の各デバイスも、フィールドネットワークコントローラ118との間でタイミングを管理するための時刻基準として用いられるカウンタを有している。
 カウンタ119ならびに各デバイスが有するカウンタについては、上述のカウンタ126と同様の構成を採用できる。
 フィールドネットワークコントローラ118は、ネットワーク110を介した定周期通信を行うための通信マスタとして機能し、フィールドバスに接続されている各デバイスが有するカウンタが示すカウンタ値とカウンタ119が示すカウンタ値との差分を逐次監視して、必要に応じて、カウンタ値にずれが発生しているデバイスに対して補正を指示するための同期信号を出力する。このように、フィールドネットワークコントローラ118は、デバイスのカウンタが示すカウンタ値をカウンタ119が示すカウンタ値と一致させるための指令をデバイスへ与える同期管理機能を有している。
 信号ポート110Pは、時刻同期信号130を伝送する信号線113が接続される。
 図6のCPUユニット100では、カウンタ119、カウンタ121およびカウンタ123は、カウンタ126と同期する。
 図6には、プロセッサ102がプログラムを実行することで必要な機能が提供される構成例を示したが、CPUユニット100は、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASIC(Application specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)など)を用いて実装してもよい。あるいは、CPUユニット100の主要部を、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 本実施の形態に係る制御システム1においては、CPUユニット100およびサポート装置500が別体として構成されているが、これらの機能の全部または一部を単一の装置に集約するような構成を採用してもよい。
 (d2.機能ユニット200の構成)
 図7は、本実施の形態に係る制御装置2に含まれる機能ユニット200のハードウェア構成例を示すブロック図である。図7を参照して、機能ユニット200は、プロセッサ202、チップセット204、主メモリ206、ストレージ208、ユニット間インターフェイス210、ネットワークインターフェイス220、および信号ポート212Pを含む。信号ポート212Pは、時刻同期信号130を伝送する信号線113が接続される。
 プロセッサ202は、CPU、MPU、GPUなどで構成される。上述のCPUユニット100と同様に、機能ユニット200は、1または複数のプロセッサ202、および/または、1または複数のコアを有するプロセッサ202を有している。チップセット204は、プロセッサ202および周辺エレメントを制御することで、機能ユニット200全体としての処理を実現する。チップセット204は、時刻同期信号130を生成する回路素子である信号ジェネレーター26を含む。信号ジェネレーター26からの時刻同期信号130は、信号ポート212Pを介して信号線113に送出される。主メモリ206は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ208は、例えば、フラッシュメモリなどの不揮発性記憶装置などで構成される。
 プロセッサ202は、ストレージ208に格納された各種プログラムを読出して、主メモリ206に展開して実行することで、例えばセキュリティ事象の監視などの処理を実現する。ストレージ208には、基本的な処理を実現するためのシステムプログラム22とユーザプログラム20を格納する。また、ストレージ208は、機能ユニット200が収集した観測値の時系列データを格納する記憶領域21を有する。
 ユーザプログラム20は、ユニット間の時刻同期を制御する時刻同期プログラム23おおよびセキュリティ監視処理のためのセキュリティプログラム24を含む。時刻同期プログラム23は、実行されることにより後述する補正部20Aまたは補正部20Bを実現するための補正プログラム25を含む。また、セキュリティプログラム24は、制御装置2の運用者または管理者などが予め定めた規則などを規定するセキュリティ設定に基づく、セキュリティ監視処理を実施し、処理の結果に基く観測値を収集し、時系列データとして記憶領域21に格納する。
 ユニット間インターフェイス210は、データバス111を接続する。ユニット間インターフェイス210は、データバス111を介してCPUユニット100とデータを遣り取りする。
 ユニット間インターフェイス210は、CPUユニット100または他の機能ユニット200とデータを送受信するためのコントローラ(Tx/Rx CTRL)およびバッファを備えるデータ通信回路211、およびカウンタ213を備える。
 ネットワークインターフェイス220は、ネットワーク11を介してデータを遣り取りするためにコントローラ(Tx/Rx CTRL)222およびバッファ226を含む。
 ユニット間インターフェイス210およびネットワークインターフェイス220が備えるバッファは、送信すべきデータおよび受信したデータなどを一時的に蓄える記憶部に相当する。カウンタ213は、CPUユニット100が備えるカウンタ126(図6参照)と同様の構成を備える。
 機能ユニット200のネットワークインターフェイス220およびユニット間インターフェイス210は、NIC(Network Interface Card)から構成されてもよい。また、図7には、プロセッサ202がプログラムを実行することで必要な処理が実現される構成例を示したが、これらの提供される処理の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 (d3.機能ユニット300の構成)
 図8は、本実施の形態に係る制御装置2に含まれる機能ユニット300のハードウェア構成例を示すブロック図である。図8を参照して、機能ユニット300は、制御システム1による様々な機械または設備等の制御を実現するために必要な各種機能を提供する。より具体的には、機能ユニット300の各々は、機能モジュール157と、I/Oインターフェイス159と、通信回路161とを含む。
 機能モジュール157は、各機能ユニット300の主たる処理を実行する部分であり、制御対象の機械または設備などからのフィールド情報の収集および制御対象の機械または設備などへの指令信号の出力などを司る。
 I/Oインターフェイス159は、制御対象の機械または設備等との間の信号の遣り取りを仲介する回路である。
 通信回路161は、データバス112を順次転送されるデータを処理する。すなわち、通信回路161は、データバス112を介して何らかのデータを受信すると、当該受信したデータを処理した後に、データバス112上において次に位置する機能ユニット300へ当該通信データを送信する。通信回路161は、このようなデータをリレーする機能を提供する。
 より具体的には、通信回路161は、送受信ポート162,164、送受信のためのコントローラ166およびカウンタ168を含む。
 送受信ポート162,164は、データバス112と物理的に接続される部位であり、コントローラ166からの指令に従って、データバス112上を伝送されるデータの受信および再生などの処理を行うことで、データの順次転送を実現する。
 コントローラ166は、データバス112上を転送されるデータの読出し、データの変更等のデータ処理を実施する。
 カウンタ168は、コントローラ166による指令出力または機能モジュール157での処理実行などのタイミングの基準となるクロックを発生する。カウンタ168は、としては、例えばリアルタイムクロックによるカウンタを採用することもできるが、本実施の形態においては、所定周期でカウントアップ(インクリメント)するフリーランカウンタを適用することができる。
 (d4.CPUユニット100のソフトウェア構成例)
 次に、本実施の形態に係る制御システム1を構成するCPUユニット100のソフトウェア構成例について説明する。
 図9は、本実施の形態に係るCPUユニット100のソフトウェア構成例を示すブロック図である。図9を参照して、CPUユニット100は、PLCエンジン150と、時系列データベース180と、上位接続プログラム192と、ゲートウェイプログラム194とを含む。
 PLCエンジン150は、典型的には、CPUユニット100のプロセッサ102が、二次記憶装置108に格納されているシステムプログラムを読出して主記憶装置106に展開して実行することで各種プログラムの実行環境が提供され、当該実行環境下において、各種プログラムを実行することができる。
 より具体的には、PLCエンジン150は、制御プログラム152と、変数管理プログラム160と、スケジューラプログラム170と、入力プログラム172と、出力プログラム174と、時刻同期プログラム177を含む。変数管理プログラム160と、スケジューラプログラム170と、入力プログラム172と、出力プログラム174とについては、システムプログラムの一部として実装されてもよい。この場合には、これらのプログラムが提供するそれぞれの機能を単一のシステムプログラムが提供するようにしてもよい。
 制御プログラム152は、典型的には、ユーザプログラム154と、データベース書込みプログラム156と、シリアライズ通信プログラム158とにより構成される。ユーザプログラム154は、制御演算機能を提供する主たる部分に相当し、CPUユニット100の制御対象の製造装置や設備などに応じて任意に構成することができる。ユーザプログラム154は、例えば、ファンクションブロックなどを利用したラダーロジックなどで規定することができる。
 データベース書込みプログラム156は、ユーザプログラム154内に規定された命令によって呼び出され、時系列データベース180に対して指定されたデータを書込む。
 シリアライズ通信プログラム158は、データベース書込みプログラム156から時系列データベース180に対して書込まれるデータに対してシリアライズ処理を行う。より具体的には、シリアライズ通信プログラム158は、時系列データを格納可能なバイト列に変換する処理(シリアライズ)を実行する。対象のデータは、シリアライズ処理により所定のバイト列に変換された上で、時系列データベース180内に格納される。なお、時系列データベース180へのデータ書込みの速度およびデータ容量などに応じて、必ずしもシリアライズ処理を行う必要はない。すなわち、シリアライズ通信プログラム158はオプショナルな構成である。
 変数管理プログラム160は、PLCエンジン150で利用可能な値を変数の形で管理する。より具体的には、変数管理プログラム160は、CPUユニット100の状態などを示すシステム変数と、CPUユニット100とローカルバスまたはフィールドバスを介して接続される各種デバイスが保持する値を示すデバイス変数と、CPUユニット100で実行されるユーザプログラム154が保持する値を示すユーザ変数とを管理する。
 入力プログラム172は、CPUユニット100とローカルバスまたはフィールドバスを介して接続される各種デバイスから入力データを取得する機能を提供する。
 出力プログラム174は、CPUユニット100において実行されるユーザプログラム154によって算出される指令値(出力データ)をデータバス112またはネットワーク110を介して接続される対象のデバイスへ出力する。
 時刻同期プログラム177は、CPUユニット100内の制御プログラムの実行時に、CPUユニット100と、データバス111に接続される機能ユニット200と、データバス112に接続される機能ユニット300と、ネットワーク110に接続されるフィールド機器90との間における時刻同期を実現する。時刻同期プログラム177は、時刻同期をとるために管理するタイマを適宜補正するための補正プログラム178を備える。補正プログラム178が実行されることにより後述する補正部10Bが実現される。補正部10Bにより実施される補正処理については後述する。
 スケジューラプログラム170は、CPUユニット100のプロセスまたはタスクなどに対して、リソース割当てや実行タイミングなどを管理する。このような、プロセスまたはタスクは、制御プログラム152および変数管理プログラム160、入力プログラム172、出力プログラム174および時刻同期プログラム177等がCPUユニット100により実行されることにより生成され得るプロセスまたはタスクが含まれる。
 時系列データベース180は、典型的には、主記憶装置106または二次記憶装置108に配置され、データを格納する機能とともに、外部からの要求(クエリ)に応答して、指定されたデータを応答する検索機能を搭載している。時系列データベース180は、データベース書込みプログラム156により書込まれる時系列データ182を格納している。すなわち、時系列データベース180は、入力データ、出力データ、制御プログラム152による制御演算において算出される演算データ、製造データ、イベントデータの少なくとも一部を時系列に格納する。このような入力データおよび出力データには、CPUユニット100が機能ユニット300から受信するデータおよびCPUユニット100が機能ユニット300へ送信するデータが含まれる。また、イベントデータには、CPUユニット100が、機能ユニット200から受信するセキュリティ監視に関するデータが含まれ得る。
 上位接続プログラム192は、製造実行システム400などの上位のネットワーク13に接続された外部装置との間でデータを遣り取りする。本実施の形態に係るCPUユニット100においては、CPUユニット100から製造実行システム400に対して入力データや演算データが出力されるとともに、製造実行システム400から製造情報を受信することができる。このように、上位接続プログラム192は、制御対象に関連付けられた製造実行システム400から製造データを取得する製造データ取得機能を提供する。
 本実施の形態では、製造実行システム400は時系列DB450を有している。この場合には、上位接続プログラム192に代えて、あるいは、上位接続プログラム192の一部として、データベース接続プログラム193が設けられ得る。データベース接続プログラム193は、例えば、リレーショナルデータベースに対してSQLなどのクエリを送信するとともに、応答を受信する処理を実行するようにしてもよい。データベース接続プログラム193が実行されることにより、CPUユニット100内の時系列データベース180の時系列データ182は、製造実行システム400に転送されて、時系列DB450に格納され得る。データベース接続プログラム193により製造実行システム400へ出力される時系列データの詳細については後述する。
 ゲートウェイプログラム194は、クラウド上の装置と通信する。例えば、クラウド上のIoTサービスを提供する装置に対して、時系列データベース180の時系列データ182を提供する。具体的には、ゲートウェイプログラム194は、時系列データベース180から、指定された種類のデータを指定された周期で取得して、時系列データとして出力する。ゲートウェイプログラム194によりIoTサービスの提供装置へ出力される時系列データは、例えば、データベース接続プログラム193により製造実行システム400へ出力される時系列データと同様な構成を備えることができる。
 CPUユニット100の入力プログラム172は、データバス111,112および/またはネットワーク110を介してセンサ等のフィールド機器90から入力データを取得する。
 CPUユニット100の上位接続プログラム192は、製造実行システム400から製造データを取得する。変数管理プログラム160は、これらの取得された入力データおよび製造データを変数として管理する。
 ユーザプログラム154は、変数管理プログラム160により管理されるシステム変数、デバイス変数、ユーザ変数を参照しつつ、予め指定された制御演算を実行し、その実行結果(出力データ)を変数管理プログラム160に出力する。
 出力プログラム174は、ユーザプログラム154の制御演算によって算出される出力データを制御出力として、データバス112および/またはネットワーク110を介してアクチュエータ等のフィールド機器90へ出力する。
 データベース書込みプログラム156は、変数管理プログラム160により管理される変数のうち指定された観測値を時系列データベース180に書込む。
 上位接続プログラム192は、変数管理プログラム160により管理される変数のうち指定された変数の値、および/または、時系列データベース180に格納された時系列データ182のうち指定されたデータを、時系列データとして製造実行システム400へ出力する。
 ゲートウェイプログラム194は、変数管理プログラム160により管理される変数のうち指定された変数の値、および/または、時系列データベース180に格納された時系列データ182のうち指定されたデータを、時系列データとしてIoTサービスへ出力する。IoTサービスの提供装置は、例えば、CPUユニット100からの時系列データに基づいて、挙動解析を行って、制御対象の設備や装置などの予知保全などを行うサービスを提供する。
 (d5.時刻同期の構成)
 まず、本実施の形態に係る制御装置2は、時刻およびカウンタを同期させる機能(以下、それぞれ「時刻同期」および「カウンタ同期」とも称す。)を有している。
 本明細書において、「時刻」は、時の流れにおけるある一点を示すものを意図し、例えば、時分秒などの単位を用いて規定される。「カウンタ」は、制御装置2および関連する装置内でタイミングを制御するための値を包含し、基本的には、予め定められた単位時間毎に所定値ずつインクリメントまたはデクリメントされる値(以下では、カウンタが示す値を「カウンタ値」とも称す。)を示す。本実施の形態では、限定されないが、カウンタ値はタイマの値に相当し、例えばナノ秒のオーダを表現し得る64ビット長の整数値を表す。
 基本的には、時刻の同期精度は、カウンタの同期精度より劣っていることから、本実施の形態では、制御装置2を構成するユニット間および各ユニットとフィールド機器90を含む他のデバイスとの間では、カウンタ値を用いた時刻同期が採用される。
 図10Aと図10Bは、本実施の形態に係る制御装置2が管理する時刻同期のための構成の一例を模式的に示す図である。図10Aと図10Bを参照して、ネットワーク11から各制御装置2がマスタクロックのカウンタ値を取得するための構成、および時刻同期信号130をトリガとして時刻同期の実現するための構成を説明する。図10Aと図10Bでは、時刻同期信号130は、機能ユニット200の信号ジェネレーター26(図7参照)により生成されて信号線113に伝送される。
 このような時刻同期を実現する構成を、例えば、制御装置2にネットワーク11を介してTSN(Time-Sensitive Networking)のマスタクロックが提供されるケース(図10A参照)と、制御装置2にネットワーク11を介してEtherCAT(登録商標:Ethernet for Control Automation Technology)のマスタクロックが提供されるケース(図10B参照)とに分けて説明する。なお、ネットワーク11を介して制御装置2に提供されるマスタクロックの規格は、これらに限定されず、例えばIEEE1588であってもよい。
 まず、図10Aを参照して、TSNのマスタクロック191Aを、例えばネットワーク11上の装置/ライン管理装置190が提供すると想定する。マスタクロック191Aは、例えばインターネット上に配置された時刻同期サーバが管理する絶対時刻を示す。なお、マスタクロック191Aは、ネットワーク11上の他の装置であってもよい。
 機能ユニット200は、時刻同期プログラム23が実行されることにより、同期処理部200Aを備える。同期処理部200Aは、ネットワークインターフェイス220を介して装置/ライン管理装置190と通信し、マスタクロック191Aを参照する。また、同期処理部200Aは、カウンタDC1およびカウンタOC1を有する。同期処理部200Aは、カウンタ値の補正処理を実施する補正部20Aを備えてもよい。カウンタDC1とカウンタOC1は、例えばカウンタ213(図6または図7参照)に相当する。
 また、CPUユニット100は、時刻同期プログラム177が実行されることにより、同期処理部100Aを備える。同期処理部100Aは、補正部10B、記憶領域10C、カウンタDC2およびカウンタOC2を備える。カウンタDC2は、カウンタ119およびカウンタ123(図6参照)に対応する。また、カウンタDC2は、スケジューラプログラム170が制御プログラム152等の実行タイミングをスケジューリングするために参照するカウンタ(図6のカウンタ126等)にも対応する。また、カウンタOC2はカウンタ121(図6参照)に対応する。なお、カウンタOC1,OC2は、Ordinary Clockによるカウンタを表し、カウンタDC1,DC2はDistributed Clockによるカウンタを表す。
 同期処理部200Aは、装置/ライン管理装置190の時刻同期サーバとしての機能を利用して、マスタクロック191Aの時刻を取得するとき、ネットワーク11等の伝送遅延を補正する。これにより、同期処理部200Aは、マスタクロック191Aから、より正確な時刻を取得することができる。同期処理部200Aは、マスタクロック191Aから取得した時刻に基づくカウンタ値をカウンタOC1に設定する。同期処理部200Aは、定期的に装置/ライン管理装置190からマスタクロック191Aの時刻を取得し、カウンタOC1に設定する。
 これにより、機能ユニット200では、同期処理部200Aは、カウンタOC1をマスタクロック191Aに同期させることが可能となる。
 また、機能ユニット200は、CPUユニット100に対して時刻同期サーバとして機能する。すなわち、同期処理部200Aは、周期的に、カウンタOC1のカウンタ値をデータバス111に送信する。これにより、機能ユニット200は、データバス111に接続されたCPUユニット100に対し、マスタクロック191Aに同期しているカウンタ値(すなわち、カウンタOC1のカウンタ値)を提供することができる。
 一方、CPUユニット100の同期処理部100Aは、例えば起動時にデータバス111を介してカウンタOC1のタイマ値を受信し、受信したタイマ値をカウンタOC2に設定する。以降は、同期処理部100Aは、カウンタOC2のカウンタ値を内部のハードウェア回路からの出力に同期して周期的に更新(インクリメント、またはデクリメント)し、更新後の値をカウンタDC2に設定する。これにより、カウンタDC2のカウンタ値は周期的に更新される。
 したがって、CPUユニット100では、同期処理部100Aは、マスタクロック191Aに同期したカウンタOC1に、カウンタOC2およびカウンタDC2を同期させるので、カウンタDC2をマスタクロック191Aに同期させることが可能となる。
 CPUユニット100は、プログラムのスケジューリングを、上記に述べたマスタクロック191Aとカウンタとの同期に基づき実施する。この点を図6と図9を参照し説明する。より具体的には、スケジューラプログラム170は、カウンタ126を基準にして制御プログラム152等のスケジューリングを実施する。また、入力プログラム172および出力プログラム174は、カウンタ126に同期したカウンタ119およびカウンタ123を基準にして各デバイスと時刻同期を実施する。これにより、CPUユニット100内における制御プログラム152等のスケジューリング、および制御装置2に接続される各デバイスと当該制御装置2の時刻同期を、マスタクロック191Aを基準にして実施することが可能となる。その結果、CPUユニット100内における制御プログラム等のスケジューリングおよび制御装置2に接続される各デバイスと当該制御装置2の間の入出力を、マスタクロック119Aに同期させて実施することが可能となる。
 (d6.時刻同期信号に基づくカウンタの補正)
 本実施の形態では、例えば、カウンタDC2のカウンタ値の更新はCPUユニット100の内部のハードウェア回路の出力信号に同期して実施される。そのため、ハードウェア回路の誤差等に起因して機能ユニット200のカウンタOC1のカウンタ値と、CPUユニット100のカウンタDC2のカウンタ値との差(以下、これを同期ずれともいう)が大きくなる可能性がある。同期ずれが大きくなると、CPUユニット100内における制御プログラムのスケジューリング、および制御装置2に接続される各デバイスと当該制御装置2との間の入出力を、マスタクロック119Aに同期させて実施することができないとの事態が生じる。なお、上記の差が生じる要因は、ハードウェア回路の誤差等に限定されない。
 このような事態を防止するために、同期処理部100Aは、同期ずれを低減するための値(以下、調整値Dともいう)を用いてカウンタDC2のカウンタ値を補正する。具体的には、補正部10Bは、信号線113から時刻同期信号130を受信したとき、ラッチ処理を含む補正処理を実施する。
 ラッチ処理では、補正部10Bは、カウンタDC2のカウンタ値をラッチ(取得)し、ラッチしたカウンタ値LDC2を記憶領域10Cに格納する。また、ラッチ処理では、補正部10Bは、データバス111を介して伝送されるカウンタOC1のカウンタ値をラッチ(受信)し、ラッチしたカウンタ値LOC1を記憶領域10Cに格納する。
 補正処理では、ラッチされたカウンタ値に調整値D(正の値または負の値)を加算し、加算後の値を、カウンタDC2に設定する。
 補正としては、上記の調整値DをN(N≧2)個の値に分割し、分割された値Di(i=1,2,3,…N)の各値Diを周期的にカウンタDC2のカウンタ値に累積的に加算してもよい。これにより、加算がN回繰返されて、カウンタDC2のカウンタ値を、徐々に(滑らかに)変化させることができる。
 また、補正としては、調整値Dを、指定された頻度でカウンタDC2のカウンタ値に加算するとしてもよい。
 なお、上記の調整値Dは、固定または可変である。可変値としては、ラッチされたカウンタ値LOC1とLDC2との差の大きさに従い決定された値を含み得る。また、上記の“N”の値も固定または可変であってよく、可変値としては、例えば調整値Dの大きさに従い決定された値を含み得る。
 また、補正部10Bは、時刻同期信号130を受信する毎に算出されるカウンタ値LOC1とLDC2との差の変化(ドリフト状の変動)の傾向を検出し、変化傾向に応じて上記の調整値Dまたは“N”の値を決定してもよい。つまり、時刻同期信号130を受信する毎に算出される同期ずれが小さくなるように、すなわち同期ずれの差が所定値に収束するように、上記の調整値Dまたは“N”の値を決定する。例えば、変動幅が大きいほど調整値Dを大きくし、または“N”の値を小さくすることで、同期ずれは小さくなり、且つ同期ずれは早めに所定値に収束し得る。
 また、補正として、カウンタDC2の値に上記の調整値DをセットすることによるカウンタDC2の初期化が含まれてもよい。
 また、補正処理が実施されるタイミングは、時刻同期信号130が受信された時点であってもよく、または、時刻同期信号130を受信した時から所定時間経過後であってもよい。
 また、時刻同期信号130の送信元のユニットは、機能ユニット200に限定されず、図1の制御システム1に備えられる他のユニットであってもよい。例えば、図1の制御システム1に備えられる図示しない所定のトリガ信号発生装置、またはいずれかの制御装置2(当該制御装置2のCPUユニット100または機能ユニット200,300(図5参照))、または装置/ライン管理装置190であってもよい。また、本実施の形態では、時刻同期信号130は、周期的に、例えば1m秒毎に出力されるが、周期的に出力される方式に限定されない。例えば、機能ユニット200の同期処理部200AのカウンタOC1のカウンタ値が、ある指示値に等しくなったときに、時刻同期信号130の送信元のユニットが時刻同期信号130を出力するとしてもよい。
 (d7.時刻同期の構成の他の例)
 図10Aでは、時刻はTSNが提供するマスタクロック191Aから取得されたが、時刻同期のためのマスタの時刻の取得経路はTSNに限定されない。例えば図10Bに示すように、EtherCATのマスタクロック191Bから取得されてもよい。EtherCATではマスタクロック191Bは、絶対時刻に同期している。図10Bでは、時刻同期のためにカウンタDC1とDC2が用いられる。
 図10Bを参照して、機能ユニット200の同期処理部200Bは、定期的に、マスタクロック191Bの時刻を、伝搬遅延を補正して取得する。同期処理部200Bは、取得した時刻を示すカウンタ値をカウンタDC1に設定する。同期処理部200Bは、カウンタDC1のカウンタ値を周期的に読出し、データバス111に伝送する。図10Bでは、カウンタDC1はカウンタ213(図6参照)に対応する。また、カウンタDC2は、カウンタ119、121および123(図6参照)ならびに図9においてスケジューラプログラム170が制御プログラム152等の実行タイミングをスケジューリングするために参照するカウンタ(図6のカウンタ126等)に対応する。
 起動時など、CPUユニット100の同期処理部100Bは、データバス111を介して受信したカウンタ値をカウンタDC2に設定する。その後、カウンタDC2の値を内部のハードウェア回路の出力に同期して更新(インクリメントまたはデクリメント)する。これにより、カウンタDC2のカウント値は周期的に更新される。また、同期処理部100Bの補正部10Bは、時刻同期信号130を、信号線113を介して受信したとき、データバス111を介して受信するカウンタ値をラッチし、ラッチカウンタ値LDC1として記憶領域10Cに格納する。また、補正部10Bは、時刻同期信号130を受信したとき、カウンタDC2のカウンタ値をラッチし、ラッチカウンタ値LDC2として記憶領域10Cに格納する。
 補正部10Bの補正処理では、図10Aの場合と同様の補正を実施することができる。図10Bでは、補正に用いる調整値Dは、ラッチカウンタ値LDC1とLDC2との差(同期ずれ)の大きさに従い決定された値を含み得る。
 また、補正部10Bは、時刻同期信号130を受信する毎に算出されるラッチカウンタ値LDC1とLDC2との差の変化(ドリフト状の変動)の傾向を検出し、変化傾向に応じて上記の調整値Dまたは“N”の値を決定してもよい。例えば、時刻同期信号130を受信する毎に算出される差が小さくなるように、すなわち差が所定値に収束するように、上記の調整値Dまたは“N”の値を決定してもよい。
 また、補正として、カウンタDC2の値に上記の調整値をセットすることにより、カウンタDC2の初期化が含まれてもよい。
 また、図10Bの構成においても、補正処理を実施する時期は、図10Aと同様の時期であってよい。また、図10Bでは、例えばカウンタDC1のカウンタ値が、ある指示値に等しくなったときに時刻同期信号130が信号線113に出力されてもよい。
 (d8.時刻同期信号に基づくカウンタの補正の他の例)
 図10Aと図10Bでは、補正処理はCPUユニット100の補正部10Bが実施する構成に限定されず、機能ユニット200の補正部20Aおよび記憶部20Cを用いて実施してもよい。
 具体的には、図10Aを参照して、CPUユニット100の同期処理部100Aは、カウンタDC2のカウンタ値をデータバス111に周期的に送信する。補正部20Aは、信号線113から時刻同期信号130を受信するとラッチ処理を実施する。
 ラッチ処理では、補正部20Aは、カウンタOC1のカウンタ値をラッチ(取得)し、また、データバス111を介して伝送されるカウンタDC2のカウンタ値をラッチ(受信)する。このようしてラッチされたカウンタ値を、ラッチカウンタ値LOC1およびLDC2として記憶部20Cに格納する。
 補正処理では、補正部20Aは、記憶部20Cのラッチカウンタ値LOC1およびLDC2の同期ずれの差を算出し、差が小さくなるような調整値D(正の値または負の値)を決定し、決定した調整値Dをラッチカウンタ値LDC2に加算する。補正部20Aは、加算後のラッチカウンタ値を、データバス111を介してCPUユニット100に転送する。CPUユニット100は、受信した加算後のラッチカウンタ値を、カウンタDC2に設定する。これにより、CPUユニット100のカウンタDC2のカウンタ値は、同期ずれが補正される。
 また、図10Bでも、補正部20Bが、記憶部20Cを用いてCPUユニット100のカウンタDC2のカウンタ値の補正処理を実施してもよい。この場合、同期処理部100Bは、カウンタDC2のカウンタ値をデータバス111に周期的に送信する。補正部20Bは、信号線113から時刻同期信号130を受信するとラッチ処理を実施する。
 ラッチ処理では、補正部20Bは、カウンタDC1のカウンタ値をラッチ(取得)し、また、データバス111を介して伝送されるカウンタDC2のカウンタ値をラッチ(受信)する。このようしてラッチされたカウンタ値を、ラッチカウンタ値LDC1およびLDC2として記憶部20Cに格納する。
 補正処理では、補正部20Bは、ラッチカウンタ値LDC1およびLDC2の同期ずれの差が小さくなるような調整値Dを決定し、決定した調整値Dをラッチカウンタ値LDC2に加算する。補正部20Bは、加算後の値を、データバス111を介してCPUユニット100に転送する。CPUユニット100は、受信した加算後のラッチカウンタ値LDC2を、カウンタDC2に設定する。これにより、CPUユニット100のカウンタDC2のカウンタ値は、同期ずれが補正される。
 このように、制御装置2では、時刻同期信号130が信号線113を介して与えられたときの、第1のユニット(機能ユニット200)のタイマが示す第1のタイマ値(カウンタOC1のカウンタ値)および第2のユニット(CPUユニット100)のタイマが示す第2のタイマ値(カウンタDC2のタイマ値)の一方が、データライン(データバス111)を介して取得されて、当該取得されたタイマ値に基づいて、第1のユニットのタイマと第2のユニットのタイマとの間の同期ずれが補正される。これにより、第1のユニット(機能ユニット200)のタイマ(カウンタOC1)に第2のユニット(CPUユニット100)のタイマ(カウンタDC2)を合わせることができる。
 図10Aと図10Bを参照して、制御システム1は、さらに、CPUユニット100および機能ユニット200とは異なるユニット370を備えて、ユニット370に上記に述べた補正処理を実施させてもよい。
 ユニット370は、信号線113とデータバス111に接続され得る。ユニット370は、ハードウェアプロセッサを備えて、ハードウェアプロセッサがプログラムを実行することにより、補正部20A(または補正部20B)または補正部10Bに相当する補正部371を実現する。ユニット370は、信号線113において時刻同期信号130を検出すると、補正部371はデータバス111を介してカウンタOC1とカウンタDC2(またはカウンタDC1とカウンタDC2)からカウンタ値を読出す。補正部371は、読出されたカウンタ値を用いて上記に述べたように、同期ずれが小さくなるようカウンタDC2のカウント値を補正する。補正後のカウンタ値は、データバス111を介してカウンタDC2に設定される。
 図10Aと図10Bに示された補正部20A,20B、補正部10B、および補正部371は、調整手段の一実施例である。制御装置2または制御システム1は、補正部20A,20B、補正部10B、および補正部371によって提供される処理の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 以上のとおり、各制御装置2においては、マスタクロック191A(または191B)の時刻を用いて、(i)ユニット間で時刻同期が実現され、また(ii)各ユニットと当該ユニットに接続されるデバイス間で時刻同期が実現され、また(iii)CPUユニット100ではスケジューラプログラム170により制御プログラム152,入力プログラム172および出力プログラム174の実行についての時刻同期が実現される。さらに各制御装置2が共通のマスタクロック191A,191Bを用いた時刻同期を実施することで、(iv)異なる制御装置2の間で、すなわち異なる工程間で時刻同期を実現することができる。
 図10Aと図10Bでは、制御システム1は補正部20A,20B、補正部10Bおよび補正部371を備えるよう構成されるが、これら補正部の少なくとも1つを備えるよう構成されてもよい。
 <E.処理フロー>
 図11は、本実施の形態に係る処理のフローチャートの一例を示す図である。図11は、同期処理と観測値の収集処理を含む。図11を参照して、機能ユニット200のプロセッサ202は同期処理部200A(または200B)による処理を実施する。
 まず、プロセッサ202は、マスタクロック191A(または191B)から時刻を取得してカウンタOC1(またはDC1)にタイマ値を設定する(ステップS1)。
 プロセッサ202は、時刻同期信号130の送信時期になったかを判定する(ステップS3)。時刻同期信号130の送信時期でないと判定すると(ステップS3でNO)、ステップS1に戻るが、送信時期になったと判定すると(ステップS3でYES)、信号ジェネレーター26により時刻同期信号130を生成し、信号線113に出力する(ステップS5)。
 また、プロセッサ202は、カウンタOC1(またはDC1)のカウンタ値をデータバス111に周期的に送信している(ステップS7)。このカウンタ値の送信は、時刻同期信号130の送信にかかわらず実施される。
 また、CPUユニット100では、プロセッサ101は同期処理部100A(または100B)により処理を実施する。なお、図11の処理においては、カウンタOC2の設定およびカウンタDC2のカウンタ値を更新する処理が実施される。
 プロセッサ101は信号線113から時刻同期信号130を受信するかを判定する(ステップS25)。時刻同期信号130を受信しない間は(ステップS25でNO)は、ステップS25の処理が繰返される。
 プロセッサ101は時刻同期信号130を受信したと判定すると(ステップS25でYES)、上記に述べたカウンタ値のラッチ処理を実施する(ステップS27)。プロセッサ101は、補正部10Bによる補正処理を実施する時期になったかを判定する(ステップS29)。例えば、時刻同期信号130を受信してから所定時間が経過したかを判定する。補正を実施する時期になっていないと判定される間は(ステップS29でNO)、ステップS29の処理が繰返される。
 プロセッサ101は、補正処理を実施する時期になった、例えば時刻同期信号130を受信してから所定時間が経過したことを判定すると(ステップS29でYES)、補正部10Bに上記に述べた補正処理を実施させる(ステップS31)。
 補正処理は、ラッチされたカウンタ値の差の算出(ステップS33)、補正のための調整値Dの決定(ステップS35)、および調整値Dを用いたカウンタDC2のカウンタ値の変更(ステップS37)を含む。
 また、CPUユニット100では、プロセッサ101は、観測値を収集し時系列データベース180に格納する(ステップS41)。プロセッサ101は、時系列データベース180の時系列データ182を読出し、製造実行システム400またはクラウド上のIoTサービスの提供装置に送信する(ステップS43)。このとき、時系列データ182の伝送のフレームが生成されて、フレーム形式で送信される(ステップS45)。
 例えば、製造実行システム400は、制御装置2から時系列データ182のフレームを受信し(ステップS61)、時系列DB450に格納する(ステップS63)。
 なお、図11では、CPUユニット100において時刻同期処理のための補正を実施したが、上述したように機能ユニット200において時刻同期処理のための補正が、ステップS31と同様に実施されてもよい。
 図10Aと図10Bと図11では、機能ユニット200は、カウンタOC1(またはカウンタDC1)のカウンタ値をデータバス111に周期的に伝送することより、CPUユニット100に当該カウンタ値を提供したが、CPUユニット100にカウンタ値を提供する方法は、これに限定されない。例えば、信号線113に時刻同期信号130が伝送されるとき、CPU100が、データバス111を介して、機能ユニット200のカウンタOC1(またはカウンタDC1)のカウンタ値を参照する(読出す)方法であってもよい。
 <F.時系列データの処理>
 図12は、本実施の形態に係る製造実行システム400の構成例を示す図である。製造実行システム400は、一例として、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコン)を用いて実現される。
 図12を参照して、製造実行システム400は、プロセッサ402と、メインメモリ404と、入力部406と、出力部408と、ストレージ410と、光学ドライブ412と、外部装置と通信するためのUSBコントローラ420と、ネットワーク13,14を接続するネットワークコントローラ413を含む。これらのコンポーネントは、プロセッサバス418を介して接続されている。
 プロセッサ402は、CPUやGPUなどで構成され、ストレージ410に格納されたプログラムを読出して、メインメモリ404に展開して実行することで、後述するような各種処理を実現する。
 メインメモリ404は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ410は、例えば、HDDやSSDなどの不揮発性記憶装置などで構成される。
 ストレージ410には、基本的な機能を実現するためのOS412に加えて、製造実行システム400としての機能を提供するための各種プログラムが格納される。各種プログラムは、DB管理プログラム411を含む。また、ストレージ410は、時系列DB450を格納する領域を有する。
 入力部406は、キーボードやマウスなどで構成され、製造実行システム400に対するユーザ操作を受付ける。出力部408は、ディスプレイ、各種インジケータ、プリンタなどで構成され、プロセッサ402からの処理結果などを出力する。
 製造実行システム400は、光学ドライブ412を有しており、コンピュータ読取可能なプログラムを非一過的に格納する記録媒体414(例えば、DVD(Digital Versatile Disc)などの光学記録媒体)から、その中に格納されたプログラムが読取られてストレージ410などにインストールされる。
 図12には、プロセッサ402がプログラムを実行することで、製造実行システム400として必要な機能が提供される構成例を示したが、製造実行システム400は、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 図13は、図12のDB管理プログラム411が実行されることで提供されるDBマネージャーを示す図である。図13を参照して、プロセッサ402により、DB管理プログラム411が実行されることで提供されるDBマネージャー451は、時系列DB450を管理(例えば、DBの生成,集約,編集,解析,出力等)する。
 (f1.観測値の時刻同期)
 図14Aと図14Bは、本実施の形態に係る制御装置2が製造実行システム400に時系列データを送信する場合の処理例を示す模式図である。図14Aと図14Bでは時刻同期処理が実施されないケース(図14(A)参照)と時刻同期処理が実施されるケース(図14B参照)とが対比して示される。図15は、本実施の形態に係る制御装置2において生成される時系列データのフレームと集約データを模式的に示す図である。図15の(A)は、工程3Bの制御装置2Bが収集する観測値を格納するフレームを示し、図15の(B)は、工程3Aの制御装置2Aが収集する観測値を格納するフレームを示し、図15の(C)は、DBマネージャー451によって集約された観測値を格納する時系列DB450の一例を示す。
 図14Aには、制御装置2A,2Bが上位のネットワーク13を介して製造実行システム400と接続されている構成を示す。図14Aに示す構成においては、制御装置2Aと制御装置2Bとの間では時刻同期がなされていないとする。
 各時系列データには、制御装置2A,2Bが収集した観測値および各観測値に対応付けられる時刻が含まれる。逆にいえば、図14Aに示す構成においては、制御装置2A,2Bは、各観測値の収集タイミングを示す情報としては時刻を付加することしかできない。時刻は、制御装置2A,2Bがそれぞれ管理するものであり、時刻同期は不完全である。
 その結果、製造実行システム400にて収集される時系列データの間では、時刻が完全には一致しないので、DBマネージャー451は、タイミングを正確に合せてそれぞれの時系列データを集約(すなわち、統合)することはできない。
 これに対して、図14Bに示す構成においては、制御装置2Aと制御装置2Bとは上記に述べた時刻同期されたカウンタを備えている。その結果、制御装置2Aと制御装置2Bそれぞれから送信される時系列データのフレームには、工程3A,3Bにおいて収集した観測値に対応付けて、各観測値を収集したタイミングを示す時刻452(例えば、マスタクロックから取得した時刻)およびカウンタ値453(例えば、カウンタDC2のカウンタ値)を含めることができる(図15の(A)と図15の(B)を参照)。
 DBマネージャー451は、制御装置2A,2Bのそれぞれから受信した時系列データに含まれるカウンタ値453を用いて、時系列データに含まれる観測値のタイミングを合せることができる。すなわち、異なる制御装置2(異なる工程)でそれぞれ収集された観測値であっても、時系列DB450において時間軸をほぼ完全に一致させて集約して格納し(図15の(C)を参照)、集約したデータを観測値の解析に用いることができる。
 <G.付記>
 上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
 ファクトリオートメーション用の制御システム(1)であって、
 各々がタイマを有する第1のユニット(200)および第2のユニット(100)と、
 前記第1のユニットと前記第2のユニットとの間で、前記タイマが示すタイマ値を含むデータを遣り取りするためのデータライン(111)と、
 前記第1のユニットと前記第2のユニットとを電気的に接続する信号線(113)と、
 前記信号線および前記データラインに接続される調整手段(10B、20A、20B)と、を備え、
 前記調整手段は、
 トリガ信号(130)を前記信号線を介して受信したときの、前記データラインを介して前記タイマ値を取得し、取得したタイマ値に基づいて、前記第1のユニットのタイマ(OC1)に前記第2のユニットのタイマ(DC2)を合わせる、制御システム。
[構成2]
 前記第1のユニットおよび前記第2のユニットのうちの一方が、前記トリガ信号を前記信号線に伝送する、構成1に記載の制御システム。
[構成3]
 前記制御システムは、さらに、前記トリガ信号を前記信号線に伝送するユニットであって、前記第1のユニットおよび前記第2のユニットとは異なるユニット(190)を備える、構成1または2に記載の制御システム。
[構成4]
 前記調整手段は、前記第1のユニットおよび前記第2のユニットのうちの一方に備えられる、構成1から3のいずれか1に記載の制御システム。
[構成5]
 前記制御システムは、さらに、前記調整手段を備えるユニットであって、前記第1のユニットおよび前記第2のユニットとは異なるユニットを備える、構成1から4のいずれか1に記載の制御システム。
[構成6]
 前記調整手段は、
 前記トリガ信号を前記信号線を介して受信したとき、前記データラインを介して取得したタイマ値を用いて、前記第1のユニットのタイマのタイマ値と前記第2のユニットのタイマのタイマ値との差を取得し、取得した差に基づく調整値を用いて、前記第2のユニットのタイマのタイマ値を調整することにより、前記第1のユニットのタイマに前記第2のユニットのタイマを合わせる、構成1から5のいずれか1に記載の制御システム。
[構成7]
 前記調整手段は、
 前記トリガ信号を受信する毎に検出される前記差の大きさの変化の傾向から、前記調整値を決定する、構成6に記載の制御システム。
[構成8]
 前記制御システムは、さらに、
 第1のネットワーク(11)に接続される複数の制御装置(2)を備え、
 前記複数の制御装置の各々は、前記第1のユニットおよび前記第2のユニットを含み、
 前記複数の制御装置は、前記第1のネットワークを介して受信する共通の時刻であって前記タイマの間の同期に用いる時刻(191A,191B)により互いに同期する、構成7に記載の制御システム。
[構成9]
 前記制御システムは、さらに、
 前記第1のネットワークよりも下位の第2のネットワーク(110)を介して、前記複数の制御装置の各々に接続される1または複数の機器(90)と、
 前記複数の制御装置の間で互いに同期された同期タイマ(101A,101B,101C)と、を備え、
 前記制御装置と、当該制御装置の前記第2のネットワークに接続される前記1または複数の機器は、前記同期タイマのタイマ値により互いに同期する、構成8に記載の制御システム。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 1 制御システム、2,2A,2B,2C 制御装置、3A,3B,3C 工程、10B,20A,20B 補正部、10C,21 記憶領域、11,12,13,14,110 ネットワーク、23,177 時刻同期プログラム、24 セキュリティプログラム、90,90A,90C,90D,90F,90G,90I フィールド機器、91A,91C,91D,91F,91G,91I,101A,101B,101C,102A,102B,102C,401A,401C タイマ、100 CPUユニット、100A,100B,200A,200B 同期処理部、101,102,202,402 プロセッサ、110P 信号ポート、111,112 データバス、113 信号線、119,121,123,125,126,168,213,DC,DC1,DC2,OC,OC1,OC2 カウンタ、191,191A,191B マスタクロック、130 時刻同期信号、178 補正プログラム、180 時系列データベース、182 時系列データ、190 装置/ライン管理装置、400 製造実行システム、450 時系列DB、451 DBマネージャー、500 サポート装置、LDC1,LDC2,LOC1 ラッチカウンタ値。

Claims (9)

  1.  ファクトリオートメーション用の制御システムであって、
     各々がタイマを有する第1のユニットおよび第2のユニットと、
     前記第1のユニットと前記第2のユニットとの間で、前記タイマが示すタイマ値を含むデータを遣り取りするためのデータラインと、
     前記第1のユニットと前記第2のユニットとを電気的に接続する信号線と、
     前記信号線および前記データラインに接続される調整手段と、を備え、
     前記調整手段は、
     トリガ信号を前記信号線を介して受信したとき、前記データラインを介して前記タイマ値を取得し、取得したタイマ値に基づいて、前記第1のユニットのタイマに前記第2のユニットのタイマを合わせる、制御システム。
  2.  前記第1のユニットおよび前記第2のユニットのうちの一方が、前記トリガ信号を前記信号線に伝送する、請求項1に記載の制御システム。
  3.  前記制御システムは、さらに、前記トリガ信号を前記信号線に伝送するユニットであって、前記第1のユニットおよび前記第2のユニットとは異なるユニットを備える、請求項1または2に記載の制御システム。
  4.  前記調整手段は、前記第1のユニットおよび前記第2のユニットのうちの一方に備えられる、請求項1から3のいずれか1項に記載の制御システム。
  5.  前記制御システムは、さらに、
     前記調整手段を備えるユニットであって、前記第1のユニットおよび前記第2のユニットとは異なるユニットを備える、請求項1から4のいずれか1項に記載の制御システム。
  6.  前記調整手段は、
     前記トリガ信号を前記信号線を介して受信したとき、前記データラインを介して取得したタイマ値を用いて、前記第1のユニットのタイマのタイマ値と前記第2のユニットのタイマのタイマ値との差を取得し、取得した差に基づく調整値を用いて、前記第2のユニットのタイマのタイマ値を調整することにより、前記第1のユニットのタイマに前記第2のユニットのタイマを合わせる、請求項1から5のいずれか1項に記載の制御システム。
  7.  前記調整手段は、
     前記トリガ信号を受信する毎に取得される前記差の大きさの変化の傾向から、前記調整値を決定する、請求項6に記載の制御システム。
  8.  前記制御システムは、さらに、
     第1のネットワークに接続される複数の制御装置を備え、
     前記複数の制御装置の各々は、前記第1のユニットおよび前記第2のユニットを含み、
     前記複数の制御装置は、前記第1のネットワークを介して受信する共通の時刻であって前記第1のユニットのタイマと前記第2のユニットのタイマの間の同期に用いる時刻により互いに同期する、請求項7に記載の制御システム。
  9.  前記制御システムは、さらに、
     前記第1のネットワークよりも下位の第2のネットワークを介して、前記複数の制御装置の各々に接続される1または複数の機器と、
     前記複数の制御装置の間で互いに同期された同期タイマと、を備え、
     各前記複数の制御装置と、当該制御装置に前記第2のネットワークを介して接続される前記1または複数の機器とは、前記同期タイマのタイマ値により互いに同期する、請求項8に記載の制御システム。
PCT/JP2020/025985 2019-07-04 2020-07-02 制御システム WO2021002421A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202080046725.8A CN114080574A (zh) 2019-07-04 2020-07-02 控制***
JP2021529179A JP7484912B2 (ja) 2019-07-04 2020-07-02 制御システム
US17/623,374 US20220413474A1 (en) 2019-07-04 2020-07-02 Control system
EP20834296.4A EP3995910A4 (en) 2019-07-04 2020-07-02 CONTROL SYSTEM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019125025 2019-07-04
JP2019-125025 2019-07-04

Publications (1)

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

Family

ID=74100360

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/025985 WO2021002421A1 (ja) 2019-07-04 2020-07-02 制御システム

Country Status (5)

Country Link
US (1) US20220413474A1 (ja)
EP (1) EP3995910A4 (ja)
JP (1) JP7484912B2 (ja)
CN (1) CN114080574A (ja)
WO (1) WO2021002421A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022168338A1 (ja) * 2021-02-04 2022-08-11 オムロン株式会社 制御装置
JP2022131336A (ja) * 2021-02-26 2022-09-07 株式会社安川電機 コントローラ、機器制御システム、時刻同期方法、および時刻同期プログラム
US11770235B2 (en) 2021-02-26 2023-09-26 Kabushiki Kaisha Yaskawa Denki Time synchronization of controller
JP7499980B1 (ja) 2023-04-11 2024-06-14 三菱電機株式会社 通信機器、時刻同期システム、時刻同期方法及びプログラム

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7251402B2 (ja) * 2019-08-20 2023-04-04 オムロン株式会社 制御システム、制御装置およびプログラム
US20210356843A1 (en) * 2020-05-14 2021-11-18 Cirrus Logic International Semiconductor Ltd. System and method for providing increased number of time synchronized outputs by using communicating primary and secondary devices
CN116710857B (zh) * 2021-06-25 2024-06-25 三菱电机株式会社 输入单元、控制***、通信方法及记录介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009020547A (ja) * 2007-07-10 2009-01-29 Yaskawa Electric Corp 分散型モーション制御システム
JP2014146877A (ja) 2013-01-28 2014-08-14 Ricoh Co Ltd 通信システム、及び時刻同期方法
JP2015118505A (ja) 2013-12-18 2015-06-25 富士電機株式会社 コントローラシステム
JP2018064219A (ja) * 2016-10-14 2018-04-19 オムロン株式会社 制御装置および通信装置
WO2018146891A1 (ja) * 2017-02-09 2018-08-16 オムロン株式会社 通信システム、通信装置および通信方法
WO2019065015A1 (ja) * 2017-09-27 2019-04-04 オムロン株式会社 制御システムおよび通信方法
JP2019062288A (ja) * 2017-09-25 2019-04-18 オムロン株式会社 制御システムおよび制御装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6299064B2 (ja) * 2013-01-25 2018-03-28 オムロン株式会社 制御装置、制御方法、およびプログラム
DE112013007257T5 (de) * 2013-07-19 2016-04-07 Mitsubishi Electric Corporation Ringförmiges synchrones Netzwerksystem und Zeit-Slave-Station
CN105556404B (zh) 2014-02-27 2018-07-10 富士电机株式会社 可编程控制器***、该可编程控制器***的控制器
AT516737B1 (de) * 2015-07-24 2016-08-15 Stiwa Holding Gmbh Verfahren zur Übergabe eines Werkstückträgers
JP6772748B2 (ja) * 2016-10-14 2020-10-21 オムロン株式会社 演算装置および制御システム
JP6399136B1 (ja) * 2017-03-31 2018-10-03 オムロン株式会社 制御装置、制御プログラム、および制御システム
JP2019096243A (ja) * 2017-11-28 2019-06-20 ルネサスエレクトロニクス株式会社 半導体装置及びその故障検出方法
JP7143697B2 (ja) 2018-09-14 2022-09-29 オムロン株式会社 制御システムおよび制御装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009020547A (ja) * 2007-07-10 2009-01-29 Yaskawa Electric Corp 分散型モーション制御システム
JP2014146877A (ja) 2013-01-28 2014-08-14 Ricoh Co Ltd 通信システム、及び時刻同期方法
JP2015118505A (ja) 2013-12-18 2015-06-25 富士電機株式会社 コントローラシステム
JP2018064219A (ja) * 2016-10-14 2018-04-19 オムロン株式会社 制御装置および通信装置
WO2018146891A1 (ja) * 2017-02-09 2018-08-16 オムロン株式会社 通信システム、通信装置および通信方法
JP2019062288A (ja) * 2017-09-25 2019-04-18 オムロン株式会社 制御システムおよび制御装置
WO2019065015A1 (ja) * 2017-09-27 2019-04-04 オムロン株式会社 制御システムおよび通信方法

Non-Patent Citations (1)

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

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022168338A1 (ja) * 2021-02-04 2022-08-11 オムロン株式会社 制御装置
JP2022131336A (ja) * 2021-02-26 2022-09-07 株式会社安川電機 コントローラ、機器制御システム、時刻同期方法、および時刻同期プログラム
US11770235B2 (en) 2021-02-26 2023-09-26 Kabushiki Kaisha Yaskawa Denki Time synchronization of controller
JP7382980B2 (ja) 2021-02-26 2023-11-17 株式会社安川電機 コントローラ、機器制御システム、時刻同期方法、および時刻同期プログラム
JP7499980B1 (ja) 2023-04-11 2024-06-14 三菱電機株式会社 通信機器、時刻同期システム、時刻同期方法及びプログラム

Also Published As

Publication number Publication date
JP7484912B2 (ja) 2024-05-16
US20220413474A1 (en) 2022-12-29
CN114080574A (zh) 2022-02-22
EP3995910A4 (en) 2023-08-09
JPWO2021002421A1 (ja) 2021-01-07
EP3995910A1 (en) 2022-05-11

Similar Documents

Publication Publication Date Title
WO2021002421A1 (ja) 制御システム
CN108572613B (zh) 控制装置、信息处理方法
JP6399136B1 (ja) 制御装置、制御プログラム、および制御システム
CN111034128B (zh) 控制***以及控制装置
EP3462257A1 (en) Control system and control device
WO2021131530A1 (ja) 制御システム
WO2019163443A1 (ja) 通信システム、通信装置および通信方法
WO2020184086A1 (ja) 制御システム
WO2018070190A1 (ja) 演算装置および制御システム
WO2022185589A1 (ja) 情報処理装置、方法およびプログラム
EP3764175A1 (en) Control device and control system
CN114600416B (zh) 控制***、控制***的通信控制方法以及控制装置
Huang et al. Research on software synchronization method of real-time ethernet distributed motion control system
JP6939665B2 (ja) ネットワークシステム
EP3518472B1 (en) Network system, control method, and control device
WO2024079892A1 (ja) データ収集装置、データ収集システム、データベース作成方法及びプログラム

Legal Events

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

Ref document number: 20834296

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021529179

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020834296

Country of ref document: EP

Effective date: 20220204