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

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

Info

Publication number
WO2020105358A1
WO2020105358A1 PCT/JP2019/041736 JP2019041736W WO2020105358A1 WO 2020105358 A1 WO2020105358 A1 WO 2020105358A1 JP 2019041736 W JP2019041736 W JP 2019041736W WO 2020105358 A1 WO2020105358 A1 WO 2020105358A1
Authority
WO
WIPO (PCT)
Prior art keywords
transfer
time
arithmetic processing
data
communication data
Prior art date
Application number
PCT/JP2019/041736
Other languages
English (en)
French (fr)
Inventor
健一 岩見
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Priority to US17/286,487 priority Critical patent/US20210389741A1/en
Priority to CN201980057878.XA priority patent/CN112673362A/zh
Priority to EP19886224.5A priority patent/EP3885922A4/en
Publication of WO2020105358A1 publication Critical patent/WO2020105358A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • 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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • 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/15Plc structure of the system
    • G05B2219/15056DMA

Definitions

  • the present invention relates to selection of a transfer method for transferring communication data to a storage unit.
  • the control device and the functional unit are electrically connected by a communication line.
  • the functional unit exchanges communication data that is cyclically transmitted on the communication line with the control device.
  • the communication data is temporarily stored in the buffer of the communication circuit included in the control device.
  • the communication data is transferred from the buffer to the storage unit included in the control device.
  • Communication data is transferred by, for example, a DMA (Direct Memory Access) transfer method (hereinafter, also referred to as “DMA method”).
  • DMA method is a method in which a DMA controller connected to a communication circuit transfers communication data to a storage unit.
  • Patent Document 1 discloses that in a CPU unit that constitutes a PLC, an arithmetic processing unit including a processor for executing a task and a main memory, and a local bus.
  • the DMA controller is arranged between the communication circuit and the communication circuit in charge of communication.
  • the DMA controller has a plurality of DMA cores, and each DMA core sequentially executes processing designated according to the descriptor table.
  • the control device transfers the communication data using a certain transfer method (for example, the DMA method)
  • the transfer data is transferred using another transfer method.
  • the transfer time may be longer than the case. Therefore, it is necessary to disclose a technique capable of selecting an optimum transfer method according to the amount of data.
  • the present invention has been devised in view of the actual situation, and provides a technique capable of selecting an optimum transfer method according to the amount of data.
  • a control system includes one or more functional units, and a control device for exchanging communication data cyclically transmitted between the one or more functional units.
  • the control device includes a communication circuit having a first storage unit for temporarily storing communication data, a second storage unit for storing communication data transferred from the first storage unit according to any of a plurality of transfer methods, An arithmetic processing unit that executes arithmetic processing using the communication data stored in the second storage unit, and a DMA controller connected to the arithmetic processing unit and the communication circuit are included.
  • the plurality of transfer methods include a first transfer method in which the arithmetic processing unit transfers the communication data and a second transfer method in which the DMA controller transfers the communication data, and the arithmetic processing unit follows the instruction from the user, or According to a predetermined condition, one of the first transfer method and the second transfer method is selected.
  • control system can select the optimal transfer method according to the amount of data during operation of the system.
  • the arithmetic processing unit has a first transfer time of the communication data transferred to the second storage unit by the first transfer method, and a first transfer time of any one of the transfer time and the arithmetic processing time.
  • the time for transferring the communication data to the second storage unit by the second transfer method and the second transfer time for any one of the time for transferring and the time for executing the arithmetic processing are measured, You may make it output the measurement data containing 1 transfer time and 2nd transfer time.
  • control system can measure either the time of the communication data transfer processing in each transfer method, or the time including the communication data transfer processing and the arithmetic processing.
  • the arithmetic processing unit has a first transfer time and a second transfer time when the power supply to the control device is started or when the configuration of one or more functional units connected to the control device is changed. And may be measured.
  • control system can measure the transfer time at the timing when a transfer method different from the currently set transfer method may be selected during system operation.
  • the average first transfer time in the first transfer time when the transfer in the communication data by the first transfer method is executed plural times and the transfer in the communication data by the second transfer method are executed plural times.
  • the average second transfer time in the second transfer time at this time may be included.
  • the arithmetic processing unit is a transfer in which the transfer is executed in a shorter time of the first transfer method in which the transfer is executed in the average first transfer time and the second transfer method in which the transfer is executed in the average second transfer time.
  • the method may be selectable.
  • control system can select a transfer method in which the communication data is transferred to the storage unit in a short time during the operation of the system, and can reduce the time required for the fixed cycle processing.
  • the measurement data includes the degree of variation in the first transfer time when the transfer of the communication data according to the first transfer method is executed a plurality of times and the degree of variation when the transfer of the communication data according to the second transfer method is executed a plurality of times.
  • the degree of variation in two transfer times may be included.
  • the arithmetic processing unit transfers with a small degree of variation of the first transfer method in which the transfer is performed with the degree of variation in the first transfer time and the second transfer method with which the transfer is performed with the degree of variation in the second transfer time. It may be possible to select the transfer method in which
  • control system can select a transfer method in which there is little variation in the time for transferring the communication data to the storage unit, and the processing in a fixed cycle can be reliably ended.
  • the control system may further include a support device that receives measurement data.
  • the support device determines, based on the received measurement data, when the communication data is transferred by the maximum time allowed for the transfer of the communication data and by any one of the first transfer method and the second transfer method.
  • a display unit that displays an image that can be compared with the actually measured time may be included.
  • control system can display an image that allows the user to intuitively determine which of the multiple transfer methods is suitable for the system.
  • a control device includes a communication circuit having a first storage unit for exchanging communication data cyclically transmitted between one or more functional units and temporarily storing the communication data; A second storage unit that stores communication data transferred from the first storage unit according to any one of the above-mentioned transfer methods; and an arithmetic processing unit that executes arithmetic processing using the communication data stored in the second storage unit. , And a DMA controller connected to the arithmetic processing unit and the communication circuit.
  • the plurality of transfer methods include a first transfer method in which the arithmetic processing unit transfers the communication data and a second transfer method in which the DMA controller transfers the communication data.
  • the arithmetic processing unit selects one of the first transfer method and the second transfer method according to an instruction from the user or according to a predetermined condition.
  • control device can select the optimal transfer method according to the amount of data during operation of the system.
  • FIG. 7 is a flowchart showing a process in which the arithmetic processing unit selects a transfer method in response to an instruction from the user.
  • PLC Pluggable Controller
  • FIG. 1 is a schematic diagram showing a main configuration of a PLC according to the first embodiment.
  • PLC 1 according to the first exemplary embodiment typically includes control device 100 and one or more functional units 200.
  • the control device 100 is one element that configures the PLC 1, and corresponds to an arithmetic unit that controls the processing of the entire PLC 1.
  • the functional unit 200 provides various functions for realizing control of various machines and equipment by the PLC 1.
  • the control device 100 and one or more functional units 200 are connected via a local bus 2 which is an example of a communication line.
  • the local bus 2 employs a kind of daisy chain configuration.
  • the control device 100 also functions as a communication unit or a communication device. More specifically, the control device 100 may function as a master communication unit that manages the entire communication on the local bus 2, and slave communication that communicates each functional unit 200 under the control of the control device 100. It may be configured to function as a unit. By adopting such a master / slave configuration, it is possible to easily control the timing of the communication data (communication frame) 20 circulating on the local bus 2.
  • the control device 100 includes an arithmetic processing unit 110, a communication circuit 130, a DMA controller 140, and a high precision timer 160. Note that the control device 100 including the arithmetic processing unit 110 may be combined with a communication unit that provides the function of the communication circuit 130.
  • the arithmetic processing unit 110 includes a processor 112, a storage unit 114, and a storage 120. Although only one processor 112 is shown in FIG. 1 for convenience of description, a plurality of processors may be implemented. Each processor may have a plurality of cores. In the arithmetic processing unit 110, the processor 112 periodically executes one or a plurality of tasks. When the arithmetic processing unit 110 executes a plurality of tasks, different priorities may be set for the plurality of tasks.
  • the processor 112 also transfers the communication data 20 (for example, the input data 134) stored in the buffer 132 of the communication circuit 130 described later to the storage unit 114.
  • the processor 112 stores the communication data 20 in accordance with, for example, a data transfer method of PIO (Programmed Input / Output) transfer described below (hereinafter, also referred to as “PIO method”) among a plurality of transfer methods used for data transfer. Transfer to the unit 114.
  • PIO Programmed Input / Output
  • the storage unit 114 is composed of a DRAM (Dynamic Random Access Memory), an SRAM (Static Random Access Memory), etc., and provides a work area required for executing a program in the processor 112.
  • DRAM Dynamic Random Access Memory
  • SRAM Static Random Access Memory
  • the storage 120 is composed of a flash memory, a hard disk, etc., and stores a system program 122, a user program 124, a configuration 126, etc.
  • the system program 122 includes an OS (Operating System) and a library for executing the user program 124 in the processor 112.
  • the system program 122 includes a task for transmitting a field value (input data) included in the communication data 20 circulating between the functional units 200 to the control device 100.
  • the field value is referred to as input data 134.
  • the system program 122 also includes a task for transmitting the control command value calculated by the control device 100 to the functional unit 200.
  • the control command value is referred to as output data 135.
  • the system program 122 includes a task for periodically executing a process (IO refresh process, which will be described later) of transmitting at least one of the input data 134 and the output data 135.
  • the user program 124 is arbitrarily created according to the machine or equipment to be controlled. Further, the system program 122 includes a task for executing a process of measuring a data transfer time in each transfer method among a plurality of data transfer methods.
  • the configuration 126 includes various setting values necessary for program execution in the control device 100 and various setting values defining the network configuration.
  • the configuration 126 includes, for example, the data amount of the input data 134 and the data amount of the output data 135 transmitted / received in the IO refresh process.
  • the communication circuit 130 exchanges communication data 20 with one or more functional units 200 via the local bus 2 which is a communication line. That is, the communication circuit 130 is in charge of transmission and reception of the communication data 20 via the local bus 2 which is a communication line.
  • the communication circuit 130 includes a buffer 132.
  • the buffer 132 temporarily stores the communication data 20 transmitted / received via the local bus 2.
  • the communication data 20 temporarily stored in the buffer 132 is, for example, input data 134 and output data 135.
  • the transmission / reception of the communication data 20 executed by the communication circuit 130 is realized as follows, for example.
  • the communication circuit 130 is physically connected to the local bus 2 and generates an electric signal according to a command from the DMA controller 140.
  • the communication circuit 130 transmits the communication data 20 on the local bus 2, demodulates an electric signal generated on the local bus 2, and outputs the communication data 20 to the arithmetic processing unit 110.
  • the “IO refresh process” includes at least one of transmission of the input data 134 to the control device 100 and the like, and transmission of the output data 135 to the functional unit 200.
  • the input data 134 is data collected by the functional unit 200.
  • the output data 135 is data stored in the storage unit 114 of the control device 100. That is, the name “IO refresh process” is for convenience and may include an update process of only one of the input data 134 and the output data 135 (for example, only the input data 134).
  • the DMA controller 140 is connected to the arithmetic processing unit 110 and the communication circuit 130, and has a function of mediating requests between the arithmetic processing unit 110 and the communication circuit 130 to accelerate data access.
  • the DMA controller 140 transfers the communication data 20 (for example, the input data 134) stored in the buffer 132 of the communication circuit 130 to the storage unit 114.
  • the DMA controller 140 transfers the communication data 20 to the storage unit 114 in accordance with, for example, a data transfer method of DMA transfer described below (hereinafter, also referred to as “DMA method”) among a plurality of data transfer methods used for data transfer. To do.
  • the DMA controller 140 gives a command to the communication circuit 130 in response to a communication request from the processor 112, for example, and transmits the input data 134 stored in the buffer 132 of the communication circuit 130 to the storage unit 114. Further, the DMA controller 140 transmits the output data 135 stored in the storage unit 114 to the communication circuit 130 in response to the communication request from the processor 112. Since at least a main part of the DMA controller 140 has a hard-wired configuration, it is possible to realize higher-speed processing than the processor 112. DMA controller 140 is typically implemented using hardware logic.
  • the DMA controller 140 is implemented using an FPGA (Field-Programmable Gate Array) which is an example of a PLD (Programmable Logic Device) and an ASIC (Application Specific Integrated Circuit) which is an example of an IC (Integrated Circuit). Good.
  • FPGA Field-Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • the high-precision timer 160 is a kind of clock for determining the timing between the control device 100 and another unit connected to the control device 100, and is realized by using a counter or the like that counts up in a predetermined cycle. ..
  • the communication data 20 is used for IO refresh processing.
  • the communication data 20 is cyclically transmitted between the plurality of functional units 200 via the local bus 2. During the period in which the communication data 20 is not transmitted, the communication data 20 may be transmitted as a message between the control device 100 and any functional unit 200 or between a plurality of functional units 200.
  • any protocol can be adopted as a protocol for exchanging data on the local bus 2.
  • the local bus 2 is illustrated as an example of the communication line, the present invention is not limited to this, and an arbitrary fixed cycle network may be adopted.
  • known networks such as EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), and CompoNet (registered trademark) may be adopted.
  • the arithmetic processing unit 110, the communication circuit 130, and the DMA controller 140 are depicted separately, but the present invention is not limited to this, and any implementation form can be adopted.
  • all or part of the arithmetic processing unit 110 and all or part of the communication circuit 130 may be configured by SoC (System on Chip) mounted on the same chip.
  • SoC System on Chip
  • a SoC in which the processor 112 of the arithmetic processing unit 110 and the main function of the DMA controller 140 are mounted on the same chip may be used. These mounting forms are appropriately selected in consideration of required performance and cost.
  • the functional unit 200 can typically include an I / O unit, a communication unit, a temperature adjustment unit, an ID (Identifier) sensor unit, and the like.
  • an I / O unit for example, a digital input (DI) unit, a digital output (DO) unit, an analog output (AI) unit, an analog output (AO) unit, a pulse catch input unit, and a plurality of types are mixed. And complex units.
  • the control device 100 mediates the exchange of data with other PLCs, remote I / O devices, functional units and the like.
  • the control device 100 may include, for example, a communication device according to a protocol such as EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), or CompoNet (registered trademark).
  • the temperature adjustment unit is a control device that includes an analog input function that acquires a temperature measurement value, an analog output function that outputs a control command, and a PID (Proportional Integral Differential) control function.
  • the ID sensor unit is a device that reads data from an RFID (Radio Frequency IDentifier) or the like in a non-contact manner.
  • the functional unit 200 processes the communication data 20 cyclically transmitted on the local bus 2. More specifically, when the communication processing unit 210 receives any communication data 20 via the local bus 2, after performing data writing and / or data reading on the received communication data 20 as necessary, The communication frame is transmitted to the functional unit 200 located next on the local bus 2. The functional unit 200 provides such a frame relay function. The functional unit 200 may simply transfer the communication frame not addressed to itself to the functional unit 200 located next.
  • Periodic task in control device 100 In the PLC 1 according to the first embodiment, one or a plurality of periodic tasks whose priorities are set are executed. Among these periodic tasks, one of the highest priority tasks (hereinafter, also referred to as “primary periodic task”) is the IO refresh process described above. There are various tasks (hereinafter, also referred to as “normal periodic task”) as tasks having lower priority than the IO refresh processing. Each of these tasks will be repeatedly executed at a preset fixed cycle.
  • FIG. 2 is a schematic diagram for explaining the execution of the periodic task in PLC1.
  • primary periodic task 1221 for executing IO refresh processing and the like is repeatedly executed at control period T1.
  • the primary periodic task 1221 is repeatedly executed, and one or more normal periodic tasks 1222 having lower priority than the primary periodic task 1221 are repeatedly executed at the control period T2.
  • the control cycle T2 of the normal cycle task 1222 may be set to a different value for each normal cycle task 1222.
  • the control cycle T1 and the control cycle T2 are constant cycles. Further, for example, the control cycle T2 is set to a value longer than the control cycle T1.
  • the normal periodic task 1222 may execute a process of transmitting various message frames to a specific functional unit 200 in response to the establishment of some event or condition. That is, also for the normal periodic task 1222, the communication circuit 130 (FIG. 1) may be activated to send a message frame to the local bus 2 as an event or periodically.
  • the IO refresh frame is repeatedly sent to the local bus 2 at regular intervals.
  • the period is constant because the functional unit 200 connected to the control device 100 has a predetermined configuration.
  • the functional unit 200 connected to the control device 100 has a predetermined configuration.
  • three functional units 200 are connected to the control device 100.
  • the amount of data exchanged by the three functional units 200 is almost the same every cycle.
  • the amount of data is defined in advance by the configuration 126. Therefore, the communication circuit 130 repeatedly outputs the IO refresh frame at a constant cycle, so that the communication data 20 (for example, the input data 134) stored in the buffer 132 has a substantially same data amount every cycle.
  • the data amount of the communication data 20 is also changed.
  • the transfer time of the input data 134 may become longer than before the data amount increased.
  • the time during which the IO refresh process is performed needs to be completed within a fixed period so as not to exceed a predetermined upper limit time. This is because the primary periodic task other than the IO refresh process may not be executed due to the increase in the time of the IO refresh process. Therefore, for example, when the data amount of the input data 134 increases, it is necessary to transfer the input data 134 by a transfer method such that the time of the IO refresh process falls within a predetermined range.
  • the time required to transfer the input data 134 stored in the buffer 132 of the communication circuit 130 to the storage unit 114 differs depending on the transfer method set when transferring the input data 134.
  • the relationship between the transfer method and the transfer time will be described below.
  • FIG. 3 is a diagram showing the transfer time according to the data amount for each transfer method.
  • the transfer time shown in FIG. 3 is, for example, data calculated in an experiment.
  • the transfer method includes, for example, a PIO method and a DMA method. Specific transfer methods in the PIO method and the DMA method will be described later.
  • the first transition line 301 to the fourth transition line 304 in FIG. 3 show the transition of the transfer time in each transfer method. More specifically, the first transition line 301 and the second transition line 302 indicate the average transfer time (hereinafter, also referred to as “average transfer time”) when the transfer of the input data 134 is executed a plurality of times. .. The average transfer time changes according to the amount of data.
  • the first transition line 301 shows the transition of the average transfer time according to the PIO method.
  • the second transition line 302 shows the transition of the average transfer time by the DMA method.
  • the third transition line 303 and the fourth transition line 304 indicate the maximum transfer time (hereinafter, also referred to as “maximum transfer time”) when the transfer of the input data 134 is executed multiple times.
  • the maximum transfer time changes according to the amount of data.
  • a third transition line 303 shows a change in transfer time according to the PIO method.
  • a fourth transition line 304 shows a change in transfer time according to the DMA method.
  • the first transition line 301 and the second transition line 302 will be described.
  • the average transfer time on the first transition line 301 is 12.5 ⁇ sec and the average transfer time on the second transition line 302 is 14 KB. It becomes 0.0 ⁇ sec.
  • the transfer time by the PIO method is shorter than the transfer time by the DMA method.
  • the average transfer time of the first transition line 301 is 20.0 ⁇ sec and the average transfer time of the second transition line 302 is 18.5 ⁇ sec.
  • the transfer time by the DMA method is shorter than the transfer time by the PIO method.
  • the transfer time of the PIO method or the DMA method is shortened depends on, for example, whether or not the data amount is less than 190 KB. More specifically, when the data amount is less than 190 KB, the transfer time of the PIO method is shorter than the transfer time of the DMA method. When the data amount is 190 KB or more, the transfer time of the DMA method is shorter than the transfer time of the PIO method. As described above, the transfer rate of the DMA method is faster than the transfer rate of the PIO method, but when the transfer is performed by the DMA method, the setting process is performed between the processor 112 and the DMA controller 140 before the transfer is started. ..
  • the third transition line 303 and the fourth transition line 304 will be described.
  • the maximum transfer time on the third transition line 303 is 32.0 ⁇ sec
  • the maximum transfer time on the fourth transition line 304 is It becomes 32.5 ⁇ sec.
  • the transfer time by the PIO method is shorter than the transfer time by the DMA method.
  • the maximum transfer time of the third transition line 303 is 40.0 ⁇ sec
  • the maximum transfer time of the fourth transition line 304 is 42.5 ⁇ sec.
  • the transfer time by the DMA method is shorter than the transfer time by the PIO method.
  • ⁇ Which of the PIO method and the DMA method the transfer time becomes shorter changes depending on, for example, whether or not the data amount is less than 125 KB. More specifically, when the data amount is less than 125 KB, the transfer time of the PIO method is shorter than the transfer time of the DMA method. When the amount of data is 125 KB or more, the transfer time of the DMA method is shorter than the transfer time of the PIO method. In this way, the transfer time in each transfer method differs depending on the data amount of the input data 134. Therefore, when the data amount of the communication data 20 changes due to the setup change or the like, the control device 100 measures the transfer time by each transfer method after the data amount changes.
  • the transition line in Fig. 3 explained so far is the value measured by the experiment.
  • the control device 100 causes the measurement unit (for example, the measurement unit 116 shown in FIG. 7), which will be described later, which is a function of the arithmetic processing unit 110, to perform average transfer in each transfer method. Time is measured. Then, the control device 100 selects a transfer method in which the average transfer time is short. Further, in the control device 100, the measuring unit 116 measures the degree of variation in transfer time in each transfer method during operation of the PLC1 system. The degree of variation in transfer time will be described later.
  • the measurement unit 116 outputs measurement data including at least one of the average transfer time and the degree of variation in the transfer time to a determination unit (for example, the determination unit 117 shown in FIG. 7) described later.
  • the determination unit 117 determines which of the plurality of transfer methods is suitable for the operation of the PLC1 system. In this way, the control device 100 measures at least one of the average transfer time and the degree of variation in the transfer time, and determines which of the plurality of transfer methods is suitable for operating the PLC1 system.
  • FIG. 4 is a diagram illustrating a process of transferring the input data 134 by the PIO method.
  • FIG. 5 is a diagram illustrating a process of transferring the input data 134 by the DMA method.
  • processor 112 reads input data 134 stored in buffer 132 of communication circuit 130. The processor 112 transfers the read input data 134 to the storage unit 114. As described above, in the PIO method, the input data 134 is transferred to the storage unit 114 via the processor 112. In other words, in the PIO method, the processor 112 transfers the input data 134 from the buffer 132 to the storage unit 114 without going through the DMA controller 140.
  • the method of transferring the input data 134 via the processor 112 may be referred to as an FW (Firmware) method.
  • FW Firmware
  • the method of transferring the input data 134 via the processor 112 will be referred to as the PIO method and the description will be continued.
  • the DMA controller 140 reads the input data 134 stored in the buffer 132 of the communication circuit 130.
  • the DMA controller 140 transfers the read input data 134 to the storage unit 114.
  • the input data 134 is transferred to the storage unit 114 via the DMA controller 140.
  • the DMA controller 140 transfers the input data 134 from the buffer 132 to the storage unit 114 without passing through the processor 112.
  • the processor 112 outputs a setting instruction to the DMA controller 140 before the processing by the DMA method is executed.
  • the DMA controller 140 which has received the setting instruction from the processor 112, starts the reading of the input data 134 stored in the buffer 132 after performing the setting necessary for starting the processing.
  • the control device 100 transfers the input data 134 temporarily stored in the buffer 132 to the storage unit 114 by one of the PIO system and the DMA system.
  • the PIO method is a method in which the processor 112 included in the arithmetic processing unit 110 transfers the input data 134 to the storage unit 114.
  • the DMA method is a method in which the DMA controller 140 transfers the input data 134 to the storage unit 114.
  • the arithmetic processing unit 110 transfers the input data 134 stored in the buffer 132 to the storage unit 114 by the PIO method (hereinafter, also referred to as “first transfer method”) (hereinafter, also referred to as “first transfer time”). .) Is measured. Further, the arithmetic processing unit 110 transfers the input data 134 stored in the buffer 132 to the storage unit 114 by the DMA method (hereinafter, also referred to as “second transfer method”) (hereinafter, also referred to as “second transfer time”). Measurement). The arithmetic processing unit 110 selects, as the transfer method for transferring the input data 134, the transfer method that has a shorter time, for example, from the first transfer time and the second transfer time.
  • FIG. 6 is a diagram showing an example of the primary periodic task 1221.
  • the primary periodic task 1221 includes IO refresh processing. Further, the primary periodic task 1221 includes an arithmetic process and a user program that are performed with the highest priority after the IO refresh process. For example, in the control cycle T1 in which the IO refresh processing, the arithmetic processing, and the user program are executed, the IO refresh processing is performed during the first transfer time by the first transfer method or the second transfer time by the second transfer method. This is the time included in the cycle Ta.
  • the first transfer time or the second transfer time may be a time included in the cycle Tb in which the IO refresh process and the arithmetic process are performed.
  • the arithmetic process is a process executed by the processor 112 using the input data 134 transferred from the buffer 132 to the storage unit 114.
  • the time for transferring the input data 134 from the buffer 132 to the storage unit 114 is the time in the cycle Ta including the time when the IO refresh processing is performed, and the cycle Tb including the time for the IO refresh processing and the arithmetic processing. Will be one of the times. More specifically, the first transfer time is, for example, the transfer time (time included in the cycle Ta) in which the input data 134 is transferred from the buffer 132 to the storage unit 114 by the PIO method, the transfer time and the arithmetic processing. One of the process execution time including the execution time (the time included in the cycle Tb).
  • the second transfer time is, for example, the transfer time (the time included in the cycle Ta) in which the input data 134 is transferred from the buffer 132 to the storage unit 114 by the DMA method, the transfer time and the time in which the arithmetic processing is executed. Any one of the included processing execution time (the time included in the cycle Tb).
  • the PLC 1 can measure, as the transfer time, the time required for the IO refresh processing alone or the time including the IO refresh processing and the arithmetic processing in each transfer method in the primary periodic task 1221.
  • the time for the IO refresh processing only (the time included in the cycle Ta) and the time including the IO refresh processing and the arithmetic processing (the time included in the cycle Tb) ) And any time.
  • the cycle Tc is the time including the user program 124. Since the control cycle T1 is a predetermined time (for example, 2,000 ⁇ sec), when the number of user programs 124 included in the cycle Tc is small, the upper limit time of at least one of the cycle Ta and the cycle Tb is lengthened. be able to. For example, when the number of user programs is 0 (zero), the control cycle T1 can be set to cycle Tb. On the other hand, when the number of user programs 124 increases, the control cycle T1 is a predetermined time, so it is necessary to shorten at least one of the cycle Ta and the cycle Tb.
  • the selection unit 118 of the arithmetic processing unit 110 can shorten the transfer time by selecting the transfer method that shortens the transfer time of the input data 134 in the IO refresh process. As a result, the PLC 1 can secure more time for executing the user program 124.
  • FIG. 7 is a functional block diagram for explaining the function of selecting the transfer method of the input data 134 based on a predetermined condition.
  • the arithmetic processing unit 110 includes a measurement unit 116, a determination unit 117, a selection unit 118, and a user program 124.
  • the measurement unit 116, the determination unit 117, and the selection unit 118 are functions implemented by the system program 122, for example.
  • the user program 124 outputs a measurement instruction to the measurement unit 116. Processing is executed in a predetermined order by a scheduler (not shown), and the program is executed at the timing when the processing of the user program 124 is executed.
  • the measuring unit 116 that has received the measurement instruction calculates the transfer time of the input data 134 according to each of the transfer methods of the PIO method and the DMA method. The measuring unit 116 measures the time until the input data 134 is read from the buffer 132 and transferred to the storage unit 114 based on the value counted by the high-accuracy timer 160 by each method.
  • the measurement unit 116 executes the transfer of the input data 134 in each method a plurality of times to calculate the transfer time.
  • the measuring unit 116 calculates an average transfer time indicating an average transfer time of each method based on the plurality of transfer times.
  • the measurement unit 116 transmits the measurement data including the average transfer time of each transfer method to the determination unit 117.
  • the determination unit 117 determines whether or not a predetermined determination condition is satisfied based on the measurement data.
  • the determination condition is, for example, a condition for selecting a transfer method having a short average transfer time.
  • the determination unit 117 compares the average transfer time of the PIO method with the average transfer time of the DMA method to determine which method has the shorter average transfer time. For example, when the determination unit 117 determines that the average transfer time of the PIO method is shorter than the average transfer time of the DMA method, the determination unit 117 outputs the determination result to the selection unit 118.
  • the selection unit 118 that has received the determination result selects the PIO method as a new transfer method for the input data 134 when the currently set transfer method is the DMA method.
  • the selection unit 118 that has received the determination result continues the transfer according to the transfer method of the currently selected PIO.
  • the PLC 1 can select one of the transfer methods according to the average transfer time in each method.
  • the PLC 1 can select an optimum transfer method according to the amount of data during operation of the system.
  • the PLC 1 can select a transfer method in which the time for transferring the input data 134 from the buffer 132 to the storage unit 114 is short during the operation of the system, and the time required for the IO refresh processing can be shortened.
  • the PLC 1 can increase the number of processes (for example, processes by a user program) executed in the primary periodic task in processes other than the IO refresh process by shortening the processing time in the IO refresh process.
  • the determination condition in the determination unit 117 may be, for example, the degree of variation in transfer time. More specifically, the determination unit 117 determines whether or not the condition is satisfied, for example, based on a determination condition that allows selection of a transfer method that provides a transfer time with a small variation degree.
  • the degree of variation is, for example, the standard deviation of a plurality of transfer times. If the degree of variation is large, the processing time of the IO refresh processing cannot be determined, and thus the processing may not be completed within a certain period.
  • the measuring unit 116 calculates the degree of variation in the transfer time of each method based on the plurality of transfer times.
  • the measuring unit 116 calculates the degree of variation based on, for example, standard deviations of a plurality of transfer times.
  • the measuring unit 116 transmits the measurement data including the degree of variation of each transfer method to the determining unit 117.
  • the determination unit 117 compares the degree of variation according to the PIO method with the degree of variation according to the DMA method, and determines which method has a smaller degree of variation. For example, when the determination unit 117 determines that the degree of variation according to the PIO method is smaller than the degree of variation according to the DMA method, the determination unit 117 outputs the determination result to the selection unit 118.
  • the selection unit 118 that has received the determination result selects the PIO method as a new transfer method for the input data 134 when the currently set transfer method is the DMA method.
  • the selection unit 118 that has received the determination result continues the transfer according to the currently selected PIO transfer method.
  • the PLC 1 can select one of the transfer methods according to the degree of variation in the transfer time in each method.
  • the PLC 1 can select a transfer method in which there is little variation in the time for transferring the input data 134 from the buffer 132 to the storage unit 114, and the IO refresh processing can be surely ended in a fixed cycle.
  • the IO refresh process is surely completed in a constant cycle, so that the PLC 1 can prevent other processes included in the primary periodic task from being unexecuted.
  • FIG. 8 is a flowchart showing a process in which the arithmetic processing unit 110 selects a transfer method that satisfies a predetermined condition.
  • the arithmetic processing unit 110 receives a measurement instruction based on the user program 124.
  • the measurement instruction is output, for example, when electric power is supplied to the control device 100 (power ON) or when the configuration of the functional unit 200 is changed (“setup change” is performed).
  • step S1002 the arithmetic processing unit 110 starts measuring the transfer time according to the first transfer method (for example, PIO method).
  • the arithmetic processing unit 110 uses the high-precision timer 160 to detect the start timing of the transfer of the input data 134 for one cycle.
  • step S1003 the arithmetic processing unit 110 determines whether or not the measurement is completed.
  • the arithmetic processing unit 110 measures the transfer time according to the PIO method a predetermined number of times (for example, 2,000 times). After detecting the end timing in the transfer of the input data 134 for one cycle, the arithmetic processing unit 110 determines that the measurement of a predetermined number of times is completed (YES in step S1003), and switches the control to step S1004. If not (NO in step S1003), arithmetic processing unit 110 switches the control to step S1003 and continues measurement until the number of times reaches a predetermined number.
  • the arithmetic processing unit 110 uses the high-precision timer 160 to count the start timing in the transfer of the input data 134 for one cycle and the same one cycle after the count is started. The count value of the end timing until the transfer of the input data 134 is ended is acquired. The arithmetic processing unit 110 detects the difference between the count value of the start timing and the count value of the end timing in the measurement of the transfer time for one cycle as the first transfer time according to the first transfer method.
  • step S1004 the arithmetic processing unit 110 starts measurement by the second transfer method (for example, DMA method).
  • the arithmetic processing unit 110 uses the high-precision timer 160 to detect the start timing of the transfer of the input data 134 for one cycle.
  • step S1005 the arithmetic processing unit 110 determines whether or not the measurement is completed.
  • the arithmetic processing unit 110 measures the transfer time by the DMA method a predetermined number of times (for example, 2,000 times). If the arithmetic processing unit 110 determines that the measurement is completed (YES in step S1005), it switches control to step S1006. Otherwise (NO in step S1005), arithmetic processing unit 110 switches the control to step S1005 and continues the measurement until the number of times reaches a predetermined number.
  • the arithmetic processing unit 110 uses the high-precision timer 160 to count the start timing in the transfer of the input data 134 for one cycle and the same one cycle after the count is started. The count value of the end timing until the transfer of the input data 134 is ended is acquired. The arithmetic processing unit 110 detects the difference between the count value of the start timing and the count value of the end timing in the measurement for one cycle as the second transfer time according to the second transfer method.
  • step S1006 the arithmetic processing unit 110 outputs measurement data including the first transfer time and the second transfer time, and the degree of variation in the first transfer time and the degree of variation in the second transfer time.
  • the arithmetic processing unit 110 outputs the measurement data to the determination unit 117.
  • the arithmetic processing unit 110 selects a transfer method in response to satisfaction of a predetermined condition.
  • the arithmetic processing unit 110 selects a transfer method that satisfies the condition that the average transfer time is short, for example. More specifically, the arithmetic processing unit 110 determines that the average transfer time of the first transfer method is shorter than the average transfer time of the first transfer method and the average transfer time of the second transfer method. If the currently set transfer method is the second transfer method, the first transfer method is selected as the subsequent transfer method. When the currently set transfer method is the first transfer method, the arithmetic processing unit 110 continues to set the current method without selecting a new transfer method.
  • the PLC 1 can shorten the time for transferring the input data 134 from the buffer 132 to the storage unit 114.
  • the PLC 1 can also select a transfer method with a small degree of variation, for example. As a result, the PLC 1 can reliably end the process of transferring the input data 134 from the buffer 132 to the storage unit 114 within a fixed period.
  • the arithmetic processing unit 110 selects a transfer method instead of the average transfer time or based on the degree of variation in transfer time according to the first transfer method and the degree of variation in transfer time according to the second transfer method. Good. Furthermore, the arithmetic processing unit 110 may select the transfer method based on both the average transfer time and the degree of variation.
  • the PLC1 according to the second embodiment is realized by using the same hardware configuration as the PLC1 according to the above-described embodiments. Therefore, description of the same hardware configuration will not be repeated.
  • the measuring unit 116, the determining unit 117, and the selecting unit 118 included in the arithmetic processing unit 110 are realized by the system program 122.
  • the functions of the measuring unit 116, the determining unit 117, and the selecting unit 118 may be realized by the user program 124.
  • the function may be realized in the control device 100 by the user creating a function block or the like in advance using the support device 300 described later and transmitting the created user program 124 to the control device 100.
  • the user program 124 having the functions of the measurement unit 116, the determination unit 117, and the selection unit 118 will be described.
  • FIG. 9 is a diagram showing an example of the user program 124 for selecting the transfer method.
  • the user program 124 is defined by a ladder program.
  • the user program 124 is, for example, when power supply is started from a state where power is not supplied to the control device 100, or when the configuration of the functional unit 200 is changed (changeover is performed). , Starts measuring the first transfer time and the second transfer time.
  • the transfer method is selected after the measurement of the first transfer time and the second transfer time is completed, the data transfer is executed by the new selected transfer method.
  • the PLC 1 can measure the transfer time at the timing when the transfer method different from the currently set transfer method may be selected during the system operation.
  • the user program 124 is defined by input elements IN0 and IN1, function blocks FB0 to FB2, and output elements OUT0 to OUT2.
  • the values of input elements IN0 and IN1 change according to the assigned variable. More specifically, the variable “ChangeTrigger” is assigned to the input element IN0.
  • a variable “SettingTrigger” is assigned to the input element IN1.
  • each of the output elements OUT0 to OUT2 changes according to the output value of the associated function block.
  • the variable "SettingTrigger" is assigned to the output element OUT0.
  • the output element OUT0 is associated with the output of the function block FB0. As a result, the value of the output element OUT0 changes according to the value of the output.
  • a variable "Done0" is assigned to the output element OUT1. Further, the output element OUT1 is associated with the output of the function block FB1. As a result, the value of the output element OUT1 changes according to the value of the output of the function block FB1.
  • a variable "Done1" is assigned to the output element OUT2.
  • the output element OUT2 is associated with the output of the function block FB2. As a result, the value of the output element OUT2 changes according to the value of the output of the function block FB2.
  • the DMA method is selected by the function block FB1 and the PIO method is selected by the function block FB2 based on the measurement data (for example, the measurement time).
  • the PLC 1a according to the third embodiment has a partially different configuration from the PLC 1 according to the above-described embodiments, and the rest is realized by using the same configuration. Therefore, description of the same configuration will not be repeated.
  • different configurations and processes will be described.
  • control device 100 selects the transfer method in response to the satisfaction of a predetermined condition.
  • the transfer method is selected in response to the instruction from the user.
  • FIG. 10 is a schematic diagram showing the main configuration of the PLC 1a according to the second embodiment.
  • the PLC 1a is typically composed of a control device 100, one or more functional units 200, and a support device 300.
  • the support device 300 is electrically connected to the control device 100 and receives measurement data measured by the control device 100.
  • the support device 300 includes a display unit 310 and displays an image based on the measurement data. The image displayed on the display unit 310 will be described later.
  • FIG. 11 is a functional block diagram illustrating the function of selecting the transfer method of the input data 134 in response to an instruction from the user.
  • the arithmetic processing unit 110 includes a measuring unit 116, a selecting unit 118, and a user program 124.
  • the functions of the measurement unit 116 and the selection unit 118 are realized by the system program 122, for example.
  • the measurement unit 116 of the arithmetic processing unit 110 transmits the measurement data to the support device 300.
  • the support device 300 that has received the measurement data displays an image based on the measurement data on the display unit 310.
  • the selection unit 118 of the arithmetic processing unit 110 can select a transfer method based on an instruction from a user who operates the support apparatus 300. More specifically, the selection unit 118 displays an image based on the measurement data on the display unit 310 of the support device 300. The support apparatus 300 transmits a selection instruction regarding the transfer method selected by the user who viewed the image displayed on the display unit 310 to the selection unit 118. The selection unit 118 selects the transfer method based on the selection instruction. As a result, the PLC 1 can select the optimum transfer method according to the amount of data during operation of the system.
  • the PLC 1 can select a transfer method in response to an instruction from a user who gives an instruction to select a transfer method that takes a short time to transfer the input data 134 from the buffer 132 to the storage unit 114 during system operation. .. Further, the PLC 1 can reduce the time required for the IO refresh process. Further, the PLC 1 can increase the processing (for example, processing by the user program) executed in the primary periodic task other than the IO refresh processing by shortening the processing time in the IO refresh processing.
  • FIG. 12 is an image generated based on the measurement data including the transfer time according to the first transfer method.
  • FIG. 13 is an image generated based on the measurement data including the transfer time by the second transfer method.
  • the first image 80 is an image showing a result of the arithmetic processing unit 110 actually measuring the transfer by the first transfer method, for example, about 2,000 times.
  • the first image 80 includes a first display area 81 and a second display area 82.
  • the first display area 81 includes an image indicating the task execution time (TaskExecutionTime).
  • the entire task execution time is the time corresponding to the control cycle T1 of the primary cyclic task 1221 described with reference to FIG. 2 or 7. That is, the task execution time indicates at least the time including the IO refresh process. More specifically, the task execution time is the highest transfer time of the measurement data when the transfer time of the input data 134 is measured a plurality of times when a certain amount of data (for example, 50 KB) is stored in the buffer 132.
  • the shortest transfer time (Min) is displayed.
  • the minimum transfer time is 400 ⁇ sec, for example.
  • the average transfer time (Average) of the measurement data when measured multiple times is displayed.
  • the average transfer time is 450 ⁇ sec, for example.
  • the maximum transfer time (Max) with the longest transfer time is displayed.
  • the maximum transfer time is, for example, 550 ⁇ sec.
  • the set period (Set period) is a period corresponding to the control period T1 and indicates the maximum period allowed for the transfer of the communication data 20 (for example, 2,000 ⁇ sec
  • the display unit 310 of the support apparatus 300 displays the maximum time allowed for the transfer of the communication data 20 (for example, the input data 134) and the time measured when the input data 134 is transferred by the PIO method. And are displayed.
  • the measured time is, for example, at least one of the minimum transfer time, the average transfer time, and the maximum transfer time.
  • the support device 300 can compare the maximum time allowed for the transfer of the communication data 20 with the transfer time measured when the communication data is transferred by the PIO method, based on the measurement data. Is displayed on the display unit 310.
  • the vertical axis shows time ( ⁇ sec) and the horizontal axis shows the number of times of actual measurement (times).
  • the second display area 82 includes measurement data when the transfer time is measured a plurality of times.
  • the actual measurement value 1001 indicates the minimum transfer time (for example, 400 ⁇ sec).
  • the actual measurement value 1002 indicates the maximum transfer time (for example, 550 ⁇ sec).
  • An average line 1003 shows an average transfer time (for example, 450 ⁇ sec).
  • the actual measurement value 1001 indicating the minimum transfer time in the second display area 82, the actual measurement value 1002 indicating the maximum transfer time, and the average line 1003 indicating the average transfer time are the minimum transfer time, the maximum transfer time, and the average transfer in the first display area 81. It is a value corresponding to time.
  • the PLC 1 displays the first image 80 including the average transfer time of the transfer times according to the first transfer method on the display unit 310 of the support device 300, so that the average time when the input data 134 is transferred according to the PIO method is displayed by the user. An image that can be grasped at a glance can be provided. Further, the PLC 1 displays the first image 80 including the minimum transfer time and the maximum transfer time according to the first transfer method and the plurality of measured values on the display unit 310 of the support device 300, thereby inputting with the first transfer method. It is possible to provide an image in which the user can grasp the degree of variation in the transfer time when the data 134 is transferred at a glance.
  • the actual measurement value 1001, the actual measurement value 1002, and the average line 1003 in the second display area 82 may be displayed in such a manner that they can be distinguished from other actual measurement values. More specifically, the measured value 1001, the measured value 1002, and the average line 1003 are compared with other measured values, and, for example, at least one of color, shape, size, and the like is changed compared with other measured values. Good. Further, display may be performed in which the actual measurement value 1001, the actual measurement value 1002, and the average line 1003 blink.
  • the second image 90 is an image showing the result of actual measurement of the transfer time by the DMA method by the arithmetic processing unit 110, for example, about 2,000 times.
  • the second image 90 includes a first display area 91 and a second display area 92.
  • the first display area 91 includes an image showing the task execution time (Task Execution Time).
  • the total task execution time is, for example, the time corresponding to the control cycle T1 of the primary cyclic task 1221 described with reference to FIG. 2 or 7. That is, the task execution time indicates at least the time including the IO refresh process. More specifically, the task execution time is the maximum transfer time of the measurement data when the transfer time of the input data 134 is measured a plurality of times when a certain amount of data (for example, 50 KB) is stored in the buffer 132. The shortest transfer time (Min) is displayed. The minimum transfer time is 880 ⁇ sec, for example. Further, the average transfer time (Average) of the measurement data when measured multiple times is displayed. The average transfer time is 900 ⁇ sec, for example.
  • the maximum transfer time (Max) with the longest transfer time is displayed.
  • the maximum transfer time is 920 ⁇ sec, for example.
  • the set period (Set period) is a period corresponding to the control period T1 and indicates the maximum period allowed for the transfer of the communication data 20 (for example, 2,000 ⁇ sec).
  • the display unit 310 of the support apparatus 300 is measured when the maximum transfer time of the communication data 20 (for example, the input data 134) is allowed and when the input data 134 is transferred by the second transfer method. Display the time and The measured time is, for example, at least one of the minimum transfer time, the average transfer time, and the maximum transfer time. In this way, the support device 300 compares the maximum time allowed for the transfer of the communication data 20 with the transfer time measured when the communication data was transferred by the second transfer method, based on the measurement data. Possible images are displayed on the display unit 310.
  • the vertical axis represents time ( ⁇ sec) and the horizontal axis represents the number of actual measurements (times).
  • the second display area 92 includes measurement data when the transfer time is measured a plurality of times.
  • the actual measurement value 1101 indicates the minimum transfer time (for example, 880 ⁇ sec).
  • the actual measurement value 1102 indicates the maximum transfer time (for example, 920 ⁇ sec).
  • the average line 1103 shows the average transfer time (for example, 900 ⁇ sec).
  • the actual measurement value 1101 indicating the minimum transfer time in the second display area 92, the actual measurement value 1102 indicating the maximum transfer time, and the average line 1103 indicating the average transfer time are the minimum transfer time, the maximum transfer time, and the average transfer time in the first display area 91. It is a value corresponding to time.
  • the PLC 1 displays the second image 90 including the average transfer time of the transfer times according to the second transfer method on the display unit 310 of the support device 300 so that the average time when the input data 134 is transferred according to the second transfer method is displayed. , It is possible to provide an image that the user can grasp at a glance. Further, the PLC 1 displays the second image 90 including the minimum transfer time and the maximum transfer time according to the second transfer method and the plurality of measured values on the display unit 310 of the support device 300, thereby inputting according to the second transfer method. It is possible to provide an image in which the user can grasp the degree of variation in the transfer time when the data 134 is transferred at a glance.
  • the actual measurement value 1101, the actual measurement value 1102, and the average line 1103 in the second display area 92 may be displayed in such a manner that they can be distinguished from other actual measurement values. More specifically, the measured value 1101, the measured value 1102, and the average line 1103 are compared with other measured values, and, for example, at least one of color, shape, size, and the like is changed compared with other measured values. Good. Further, it is also possible to display the actual measurement value 1101, the actual measurement value 1102, and the average line 1103 so as to blink.
  • FIG. 14 is a block diagram showing a hardware configuration example of the support device 300 that constitutes the control system according to the present embodiment.
  • the support device 300 includes a processor 311, such as a CPU or MPU, an optical drive 315, a main storage device 306, a secondary storage device 308, a display unit 310, and a USB (Universal Serial Bus).
  • the controller 312, the local network controller 314, the input unit 316, and the display unit 310 are included. These components are connected via a bus 320.
  • the processor 311 reads various programs stored in the secondary storage device 308, expands them in the main storage device 306, and executes the programs to implement various processes described below.
  • the processor 311 generates an image to be displayed on the display unit 310 based on the measurement data 326 acquired from the control device 100.
  • the secondary storage device 308 is composed of, for example, an HDD (Hard Disk Drive) or SSD (Flash Solid State Drive).
  • the secondary storage device 308 is typically a development program 322 for creating the user program 124, defining the system configuration, setting various parameters, etc., a parameter setting tool 324 for specifying various variables,
  • the measurement data 326 acquired from the control device 100 is included.
  • the secondary storage device 308 may also store the OS and other necessary programs.
  • the support device 300 has an optical drive 315, and from a recording medium 305 (for example, an optical recording medium such as a DVD (Digital Versatile Disc)) in which a computer-readable program is stored non-transitoryly, The stored program may be read and installed in the secondary storage device 308 or the like.
  • the various programs executed by the support device 300 may be installed via the computer-readable recording medium 305, or may be installed by being downloaded from a server device on the network. Further, the function provided by the support device 300 according to the present embodiment may be realized by using a part of the module provided by the OS.
  • the display unit 310 displays at least one of the first image 80 and the second image 90 generated by the processor 311 based on the measurement data 326 stored in the secondary storage device 308.
  • the USB controller 312 controls the exchange of data with the control device 100 via a USB connection.
  • the local network controller 314 controls the exchange of data with other devices via an arbitrary network.
  • the input unit 316 is composed of a keyboard, a mouse, etc., and receives user operations.
  • the display unit 310 includes a display, various indicators, a printer, etc., and outputs the processing result from the processor 311.
  • FIG. 3 shows a configuration example in which necessary functions are provided by the processor 311 executing a program.
  • some or all of the provided functions may be provided in a dedicated hardware circuit (for example, ASIC).
  • ASIC application specific integrated circuit
  • FPGA field-programmable gate array
  • FIG. 15 is a flowchart showing processing in which the arithmetic processing unit 110 selects a transfer method in response to an instruction from the user.
  • the arithmetic processing unit 110 outputs measurement data including the first transfer time and the second transfer time, and the degree of variation in the first transfer time and the degree of variation in the second transfer time.
  • the arithmetic processing unit 110 outputs the measurement data to the support device 300.
  • step S2001 the arithmetic processing unit 110 determines whether or not an instruction from the user from the support apparatus 300 has been received. When it is determined that the instruction from the user has been accepted (YES in step S2001), arithmetic processing unit 110 switches control to step S2002. If not (NO in step S2001), arithmetic processing unit 110 switches the control to step S1003 and continues the process until receiving an instruction from the user. When the instruction from the user is not accepted even after the elapse of a predetermined time, the arithmetic processing unit 110 ends the transfer method selection processing illustrated in FIG. 15.
  • step S2002 the arithmetic processing unit 110 selects one of a plurality of transfer methods in response to an instruction from the user. More specifically, when the instruction from the user is an instruction to select the first transfer method, the arithmetic processing unit 110, when the currently set transfer method is the second transfer method, the first processing method. Select. When the currently set transfer method is the first transfer method, the arithmetic processing unit 110 continues to set the current method without selecting a new transfer method.
  • the configuration example in which the necessary functions are provided by the processor 112 of the arithmetic processing unit 110 executing the program has been shown, but some or all of these provided functions are shown.
  • the main part of the control device 100 may be realized using hardware conforming to a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer).
  • a virtualization technique may be used to execute a plurality of OSs (Operating Systems) having different purposes in parallel and execute necessary applications on each OS.
  • the PLC 1 includes the control device 100, the functional unit 200, and the support device 300 as separate components, but all or part of these functions may be integrated into a single device. Any configuration may be adopted.
  • first image 80 and the second image 90 are separately displayed on the display unit 310 in the second embodiment, the first image 80 and the second image 90 are displayed side by side on the display unit 310. You may.
  • various values such as the minimum transfer time, the maximum transfer time, the average transfer time, and the set time described in the first image 80 and the second image 90 are examples, and other values may be used. Good.
  • the control device (100) is A communication circuit (130) having a first storage section (132) for temporarily storing the communication data (20); A second storage unit (114) for storing the communication data (20) transferred from the first storage unit (132) according to any of a plurality of transfer methods;
  • An arithmetic processing unit (110) for performing arithmetic processing using the communication data (20) stored in the second storage unit (114);
  • a DMA controller (140) connected to the arithmetic processing unit (110) and the communication circuit (130);
  • the plurality of transfer methods include a first transfer method in which the arithmetic processing unit (110) transfers the communication data (20) and a second transfer method in which the DMA controller (140) transfers the communication data (20).
  • the arithmetic processing unit (110) is Any one of the time when the communication data (20) is transferred to the second storage unit (114) by the first transfer method, the transfer time, and the operation processing time.
  • the arithmetic processing unit (110) is configured when the supply of electric power to the control device (100) is started or the configuration of the one or more functional units (200) connected to the control device (100). 3. The control system according to configuration 2, wherein the first transfer time and the second transfer time are measured when is changed.
  • the measurement data includes an average first transfer time in the first transfer time when the transfer of the communication data (20) by the first transfer method is executed a plurality of times, and the communication data by the second transfer method. Including the average second transfer time in the second transfer time when the transfer in (20) is executed a plurality of times,
  • the arithmetic processing unit (110) has a shorter one of the first transfer method in which the transfer is executed in the average first transfer time and the second transfer method in which the transfer is executed in the average second transfer time. 4.
  • the control system according to configuration 2 or 3, wherein the transfer method in which the transfer is performed in time can be selected.
  • the arithmetic processing unit (110) has one of a first transfer method in which transfer is performed with a degree of variation in the first transfer time and a second transfer method in which transfer is performed with a degree of variation in the second transfer time. 4.
  • a support device (300) for receiving the measurement data The support device (300) is configured to perform, based on the received measurement data, one of the maximum time allowed for the transfer of the communication data (20), the first transfer method, and the second transfer method. 6.
  • the control according to any one of configurations 2 to 5, including a display unit (310) that displays an image that can be compared with the time actually measured when the communication data (20) is transferred by the above transfer method. system.

Landscapes

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

Abstract

制御システムは、1または複数の機能ユニットと、当該機能ユニット間で巡回的に伝送される通信データを遣り取りする制御装置とを含む。制御装置は、ユーザからの指示に従って、または、予め定められた条件に従って、演算処理部が通信データを転送する第1転送方式と、DMAコントローラが通信データを転送する第2転送方式とのうち、いずれかの転送方式を選択する。

Description

制御システムおよび制御装置
 本発明は、通信データを記憶部に転送するための転送方式の選択に関する。
 FA(Factory Automation)を用いた生産現場等では、PLC(プラグラマブルコントローラ)やロボットコントローラなどの産業用の制御装置が導入されている。制御装置と機能ユニットとは通信線により電気的に接続されている。機能ユニットは、通信線上を巡回的に伝送する通信データを制御装置と遣り取りする。通信データは、制御装置に含まれる通信回路のバッファに一時的に格納される。通信データは、バッファから制御装置に含まれる記憶部に転送される。通信データは、例えばDMA(Direct Memory Access)転送の方式(以下、「DMA方式」とも称す。)により転送される。DMA方式は、通信回路に接続されたDMAコントローラが通信データを記憶部に転送する方式である。
 制御装置による通信データの転送に関して、特開2018-129614号公報(特許文献1)は、PLCを構成するCPUユニットにおいては、タスクを実行するプロセッサおよびメインメモリなどを含む演算処理部と、ローカルバスを介した通信を担当する通信回路との間に、DMAコントローラが配置される。DMAコントローラは、複数のDMAコアを有しており、各DMAコアは、ディスクリプタテーブルに従って指定された処理を順次実行する。これによって、演算処理部と通信回路との間のデータ伝送を含む、制御装置(プロセッサ)と機能ユニットとの間のIOリフレッシュ処理といった各種通信処理を高速に実現できる、技術を開示している([段落0143]参照)。
特開2018-129614号公報
 ところで、通信データのサイズ(データ量)によっては、制御装置がある転送方式(例えば、DMA方式)を用いて通信データの転送を行った場合に、他の転送方式を用いて通信データを転送した場合よりも、転送に要する時間が長くなることがあった。したがって、データ量に応じた最適な転送方式を選択可能な技術の開示が必要とされている。
 本発明は、係る実情に鑑み考え出されたものであり、データ量に応じた最適な転送方式を選択可能な技術を提供する。
 本発明のある局面に従う制御システムは、1または複数の機能ユニットと、1または複数の機能ユニット間で巡回的に伝送される通信データを遣り取りする制御装置とを含む。制御装置は、通信データを一時的に格納する第1記憶部を有する通信回路と、複数の転送方式のいずれかに従って、第1記憶部から転送される通信データを格納する第2記憶部と、第2記憶部に格納された通信データを用いて、演算処理を実行する演算処理部と、演算処理部と通信回路とに接続されたDMAコントローラとを含む。複数の転送方式は、演算処理部が通信データを転送する第1転送方式と、DMAコントローラが通信データを転送する第2転送方式とを含み、演算処理部は、ユーザからの指示に従って、または、予め定められた条件に従って、第1転送方式と第2転送方式とのうち、いずれかの転送方式を選択する。
 この構成によれば、制御システムは、システムの運用中にデータ量に応じた最適な転送方式を選択できる。
 演算処理部は、第1転送方式により通信データが第2記憶部に転送される時間と、該転送される時間および演算処理が実行される時間とのうちのいずれかの第1転送時間と、第2転送方式により通信データが第2記憶部に転送される時間と、該転送される時間および演算処理が実行される時間とのうちのいずかの第2転送時間とを計測し、第1転送時間と第2転送時間とを含む計測データを出力するようにしてもよい。
 この構成によれば、制御システムは、各転送方式における通信データの転送処理の時間、または、通信データの転送処理および演算処理を含む時間のいずれかを計測できる。
 演算処理部は、制御装置への電力の供給が開始された場合、または、制御装置に接続された1または複数の機能ユニットの構成が変更された場合に、第1転送時間と第2転送時間とを計測するようにしてもよい。
 この構成によれば、制御システムは、システム運用中において、現在設定されている転送方式とは別の転送方式が選択される可能性があるタイミングで、転送時間の計測を行える。
 計測データは、第1転送方式による通信データにおける転送が、複数回実行されたときの第1転送時間における平均第1転送時間と、第2転送方式による通信データにおける転送が、複数回実行されたときの第2転送時間における平均第2転送時間とを含んでいてもよい。演算処理部は、平均第1転送時間で転送が実行される第1転送方式と、平均第2転送時間で転送が実行される第2転送方式とのうち、短い時間で転送が実行される転送方式を選択可能であってもよい。
 この構成によれば、制御システムは、システムの運用中に、通信データを記憶部に転送する時間が短い転送方式を選択でき、定周期の処理に要する時間を短縮できる。
 計測データは、第1転送方式による通信データにおける転送が、複数回実行されたときの第1転送時間におけるばらつき度合いと、第2転送方式による通信データにおける転送が、複数回実行されたときの第2転送時間におけるばらつき度合いとを含んでいてもよい。演算処理部は、第1転送時間におけるばらつき度合いで転送が実行される第1転送方式と、第2転送時間におけるばらつき度合いで転送が実行される第2転送方式のうち、小さいばらつきの度合いで転送が実行される転送方式を選択可能であってもよい。
 この構成によれば、制御システムは、通信データを記憶部に転送する時間のばらつきが小さい転送方式を選択でき、定周期の処理を確実に終了させることできる。
 制御システムは、計測データを受け付けるサポート装置をさらに含んでいてもよい。サポート装置は、受け付けた計測データに基づいて、通信データの転送において許容される最大の時間と、第1転送方式および第2転送方式のうち、いずれかの転送方式により通信データが転送されたときに実測された時間とを比較可能な画像を表示する表示部を含んでいてもよい。
 この構成によれば、制御システムは、複数の転送方式のうち、いずれの転送方式がシステムに適合しているのかを、ユーザが直感的に判断可能な画像を表示できる。
  本発明の別の局面に従う制御装置は、1または複数の機能ユニット間で巡回的に伝送される通信データを遣り取りし、通信データを一時的に格納する第1記憶部を有する通信回路と、複数の転送方式のいずれかに従って、第1記憶部から転送される通信データを格納する第2記憶部と、第2記憶部に格納された通信データを用いて、演算処理を実行する演算処理部と、演算処理部と通信回路とに接続されたDMAコントローラとを含む。複数の転送方式は、演算処理部が通信データを転送する第1転送方式と、DMAコントローラが通信データを転送する第2転送方式とを含む。演算処理部は、ユーザからの指示に従って、または、予め定められた条件に従って、第1転送方式と第2転送方式とのうち、いずれかの転送方式を選択する。
 この構成によれば、制御装置は、システムの運用中にデータ量に応じた最適な転送方式を選択できる。
 本発明によれば、データ量に応じた最適な転送方式を選択可能となる。
第1の実施の形態に係るPLCの要部構成を示す模式図である。 PLCにおける周期タスクの実行を説明するための模式図である。 転送方式ごとのデータ量に応じた転送時間を示す図である。 PIO方式により入力データを転送する処理について説明する図である。 DMA方式により入力データを転送する処理について説明する図である。 プライマリ周期タスクの一例を示す図である。 予め定められた条件に基づいて、入力データの転送方式を選択する機能について説明する機能ブロック図である。 予め定められた条件を満たす転送方式を選択する処理を示すフローチャートである。 転送方式を選択するユーザプログラムの一例を示す図である。 第2の実施の形態に係るPLCの要部構成を示す模式図である。 ユーザからの指示に応答して、入力データの転送方式を選択する機能を説明する機能ブロック図である。 第1転送方式による転送時間を含む計測データに基づいて生成された画像である。 第2転送方式による転送時間を含む計測データに基づいて生成された画像である。 本実施の形態に係る制御システムを構成するサポート装置のハードウェア構成例を示すブロック図である。 演算処理部が、ユーザからの指示に応答して、転送方式を選択する処理を示すフローチャートである。
 以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。
 また、以下の説明においては、「制御システム」の典型例として、PLC(プラグラマブルコントローラ)を具体例として説明するが、PLCとの名称に限定されることなく、本明細書に開示された技術的思想は、任意の制御装置に対して適用可能である。
 <第1の実施の形態>
 [1.PLC1の装置構成]
 まず、第1の実施の形態に係るPLCの装置構成について説明する。図1は、第1の実施の形態に係るPLCの要部構成を示す模式図である。図1を参照して、第1の実施の形態に係るPLC1は、典型的には、制御装置100と、1または複数の機能ユニット200とから構成される。制御装置100は、PLC1を構成する一要素であり、PLC1全体の処理を制御する演算ユニットに相当する。機能ユニット200は、PLC1による様々な機械や設備の制御を実現するための各種機能を提供する。制御装置100と1または複数の機能ユニット200との間は、通信線の一例であるローカルバス2を介して接続されている。一例として、ローカルバス2としては、一種のデイジーチェーンの構成が採用される。
 図1に示す構成においては、制御装置100は、通信ユニットまたは通信装置としても機能する。より具体的には、制御装置100をローカルバス2における通信全体を管理するマスターの通信ユニットとして機能するようにしてもよく、各機能ユニット200を制御装置100の管理下で通信を行うスレーブの通信ユニットとして機能するように構成してもよい。このようなマスター/スレーブの構成を採用することで、ローカルバス2を巡回する通信データ(通信フレーム)20のタイミング制御などを容易に行うことができる。
 制御装置100は、演算処理部110と、通信回路130と、DMAコントローラ140と、高精度タイマ160とを含む。なお、演算処理部110を含む制御装置100に対して、通信回路130の機能を提供する通信ユニットを組み合わせるような構成であってもよい。
 演算処理部110は、プロセッサ112と、記憶部114と、ストレージ120とを含む。説明の便宜上、図1には、1つのプロセッサ112のみを描くが、複数のプロセッサを実装してもよい。なお、各プロセッサは、複数のコアを有していてもよい。演算処理部110においては、プロセッサ112が1または複数のタスクを周期的に実行する。演算処理部110で複数のタスクが実行される場合には、それらの複数のタスクに対して、互いに異なる優先度が設定されてもよい。
 また、プロセッサ112は、後述する通信回路130のバッファ132に格納された通信データ20(例えば、入力データ134)を記憶部114に転送する。プロセッサ112は、データ転送に用いられる複数の転送方式のうち、例えば、後述するPIO(Programmed Input/Output)転送のデータ転送方式(以下、「PIO方式」とも称す。)に従って、通信データ20を記憶部114に転送する。
 記憶部114は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などで構成され、プロセッサ112でのプログラムの実行に必要なワーク領域を提供する。
 ストレージ120は、フラッシュメモリやハードディスクなどで構成され、システムプログラム122、ユーザプログラム124、コンフィギュレーション126などを格納する。
 システムプログラム122は、プロセッサ112においてユーザプログラム124を実行するためのOS(Operating System)およびライブラリなどを含む。システムプログラム122は、機能ユニット200間を巡回する通信データ20に含まれるフィールド値(入力データ)を制御装置100へ送信するためのタスクを含む。以下では、フィールド値を入力データ134という。また、システムプログラム122は、制御装置100で算出される制御指令値を機能ユニット200へ送信するためのタスクを含む。以下では、制御指令値を出力データ135という。このように、システムプログラム122は、入力データ134および出力データ135の少なくともいずれかを送信する処理(後述する、IOリフレッシュ処理)を周期的に実行するためのタスクを含む。ユーザプログラム124は、制御対象の機械や設備に応じて任意に作成される。また、システムプログラム122は、複数のデータ転送方式のうち、各転送方式におけるデータ転送時間の計測の処理を実行するためのタスクを含む。
 コンフィギュレーション126は、制御装置100でのプログラム実行に必要な各種設定値やネットワーク構成を定義する各種設定値を含む。コンフィギュレーション126は、例えば、IOリフレッシュ処理で送受信される入力データ134のデータ量および出力データ135のデータ量を含む。
 通信回路130は、通信線であるローカルバス2を介して、1または複数の機能ユニット200と通信データ20を遣り取りする。つまり、通信回路130は、通信線であるローカルバス2を介した通信データ20の送受信を担当する。通信回路130はバッファ132を含む。バッファ132は、ローカルバス2を介して送受信された通信データ20を一時的に格納する。バッファ132に一時的に格納される通信データ20は、例えば、入力データ134および出力データ135である。
 通信回路130により実行される通信データ20の送受信は例えば次のように実現される。通信回路130は、ローカルバス2と物理的に接続され、DMAコントローラ140からの指令に従って電気信号を生成する。通信回路130は、ローカルバス2上に通信データ20を送信するとともに、ローカルバス2上に生じる電気信号を復調して、通信データ20を演算処理部110へ出力する。
 本明細書において、「IOリフレッシュ処理」は、入力データ134の制御装置100等への送信、および、出力データ135の機能ユニット200への送信のうちの少なくとも一方を含む。入力データ134は機能ユニット200により収集されたデータである。出力データ135は、制御装置100の記憶部114に格納されたデータである。すなわち、「IOリフレッシュ処理」との名称は便宜上のものであり、入力データ134および出力データ135のうち一方のみ(例えば、入力データ134のみ)の更新処理も含み得る。
 DMAコントローラ140は、演算処理部110および通信回路130に接続され、演算処理部110と通信回路130との間で要求を仲介して、データアクセスを高速化する機能を有している。DMAコントローラ140は、通信回路130のバッファ132に格納された通信データ20(例えば、入力データ134)を記憶部114に転送する。DMAコントローラ140は、データ転送に用いられる複数のデータ転送方式のうち、例えば、後述するDMA転送のデータ転送方式(以下、「DMA方式」とも称す。)に従って、通信データ20を記憶部114に転送する。
 DMAコントローラ140は、例えば、プロセッサ112からの通信要求に応答して、通信回路130に対して指令を与えて、通信回路130のバッファ132に格納された入力データ134を記憶部114へ送信する。また、DMAコントローラ140は、プロセッサ112からの通信要求に応答して、記憶部114に格納された出力データ135を通信回路130に送信する。DMAコントローラ140の少なくとも主要部については、ハードワイヤードな構成を有することで、プロセッサ112より高速な処理を実現可能である。典型的には、DMAコントローラ140は、ハードウェアロジックを用いて実現される。例えば、DMAコントローラ140は、PLD(Programmable Logic Device)の一例であるFPGA(Field-Programmable Gate Array)や、IC(Integrated Circuit)の一例であるASIC(Application Specific Integrated Circuit)などを用いて実装されてもよい。
 高精度タイマ160は、制御装置100および制御装置100に接続される他のユニットとの間でタイミングを決定するための一種のクロックであり、所定周期においてカウントアップするカウンタなどを用いて実現される。
 通信データ20は、IOリフレッシュ処理に用いられる。通信データ20は、ローカルバス2を介して、複数の機能ユニット200間で巡回的に伝送される。通信データ20が伝送されていない期間において、制御装置100と任意の機能ユニット200との間、あるいは、複数の機能ユニット200間には、通信データ20がメッセージ伝送されることもある。
 ローカルバス2上でデータを遣り取りするためのプロトコルとしては、任意のプロトコルを採用することができる。さらに、通信線の一例として、ローカルバス2を例示するが、これに限らず、任意の定周期ネットワークを採用してもよい。このような定周期ネットワークとしては、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などの公知のネットワークを採用してもよい。
 図1に示す構成においては、説明の便宜上、演算処理部110、通信回路130およびDMAコントローラ140に区別した構成を描いているが、これに限られることなく任意の実装形態を採用できる。例えば、演算処理部110の全部または一部と通信回路130の全部または一部とを同一のチップ上に実装したSoC(System on Chip)で構成してもよい。あるいは、演算処理部110のプロセッサ112とDMAコントローラ140の主要機能とを同一のチップ上に実装したSoCを用いてもよい。これらの実装形態については、要求される性能やコストなどを考慮して適宜選択される。
 機能ユニット200は、典型的には、I/Oユニット、通信ユニット、温度調整ユニット、ID(Identifier)センサユニットなどを包含し得る。I/Oユニットとしては、例えば、デジタル入力(DI)ユニット、デジタル出力(DO)ユニット、アナログ出力(AI)ユニット、アナログ出力(AO)ユニット、パルスキャッチ入力ユニット、および、複数の種類を混合させた複合ユニットなどが挙げられる。
 制御装置100は、他のPLC、リモートI/O装置、機能ユニットなどとデータの遣り取りを仲介する。制御装置100は、例えば、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などのプロトコルに係る通信装置などを包含し得る。
 温度調整ユニットは、温度計測値などを取得するアナログ入力機能と、制御指令などを出力するアナログ出力機能と、PID(Proportional Integral Differential)制御機能とを含む制御装置である。IDセンサユニットは、RFID(Radio Frequency IDentifier)などから非接触でデータを読出す装置である。
 機能ユニット200は、ローカルバス2上において巡回的に伝送される通信データ20を処理する。より具体的には、通信処理部210は、ローカルバス2を介して何らかの通信データ20を受信すると、必要に応じて、当該受信した通信データ20に対するデータ書込みおよび/またはデータ読出しを行った後に、ローカルバス2上において次に位置する機能ユニット200へ当該通信フレームを送信する。機能ユニット200は、このようなフレームリレーの機能を提供する。なお、機能ユニット200は、自ユニット宛ではない通信フレームについては、単純に次に位置する機能ユニット200へ当該通信フレームを転送することもある。
 [2.制御装置100における周期タスク]
 第1の実施の形態に係るPLC1においては、それぞれ優先度が設定された1または複数の周期タスクが実行される。このような周期タスクのうち、最高優先度のタスク(以下、「プライマリ周期タスク」とも称す。)の一つとして上述のIOリフレッシュ処理がある。IOリフレッシュ処理の優先度より低い優先度のタスクとして、各種のタスク(以下、「通常周期タスク」とも称す。)がある。これらのタスクは、予め設定されたそれぞれの一定周期が繰返し実行されることになる。
 図2は、PLC1における周期タスクの実行を説明するための模式図である。図2を参照して、制御装置100においては、IOリフレッシュ処理などを実行するためのプライマリ周期タスク1221が制御周期T1で繰返し実行される。また、プライマリ周期タスク1221が繰返し実行されるとともに、プライマリ周期タスク1221より優先度の低い1または複数の通常周期タスク1222が制御周期T2で繰返し実行される。通常周期タスク1222の制御周期T2は、通常周期タスク1222ごとに異なる値に設定されていてもよい。制御周期T1および制御周期T2は一定周期である。また、例えば、制御周期T2は、制御周期T1より長い値に設定される。
 通常周期タスク1222としては、何らかのイベントまたは条件の成立に応答して、特定の機能ユニット200へ各種メッセージフレームを送信する処理が実行されることもある。すなわち、通常周期タスク1222についても、通信回路130(図1)を起動してメッセージフレームをローカルバス2上にイベントまたは周期的に送出する場合もある。
 これに対して、プライマリ周期タスク1221に含まれるタスクのうち、IOリフレッシュ処理が実行される場合には、IOリフレッシュフレームが一定の周期ごとに繰返しローカルバス2上に送出される。周期が一定となるのは、制御装置100に接続される機能ユニット200の構成が、予め定まった構成となるためである。例えば、図1においては3台の機能ユニット200が制御装置100に接続されている。3台の機能ユニット200が遣り取りするデータ量は、毎周期ほぼ同じデータ量となる。なお、データ量は、コンフィギュレーション126により予め規定されている。したがって、通信回路130がIOリフレッシュフレームを一定周期で繰返し送出することで、バッファ132に格納される通信データ20(例えば、入力データ134)のデータ量は、毎周期ほぼ同じデータ量となる。
 そして、制御装置100に接続される機能ユニット200の構成が変更される「段取り替え」等が行われると、通信データ20のデータ量も変更される。例えば、制御装置100に接続される機能ユニット200の数が増加してデータ量も増加することで、データ量が増加する前よりも、入力データ134を転送する時間が長くなる場合がある。このような場合であっても、IOリフレッシュ処理が行われる時間は、予め定められた上限の時間を超えないよう定周期内で終了する必要がある。IOリフレッシュ処理の時間が増加することで、IOリフレッシュ処理以外のプライマリ周期タスクが実行されない可能性があるためである。したがって、例えば、入力データ134のデータ量が増加した場合に、IOリフレッシュ処理の時間が予め定められた範囲内となるような転送方式で入力データ134を転送する必要がある。
 ここで、通信回路130のバッファ132に格納された入力データ134を記憶部114に転送する場合に要する時間は、入力データ134を転送する場合に設定される転送方式によって異なる。以下、転送方式と転送時間との関係について説明する。
 [3.転送方式と転送時間との関係]
 図3を参照して、転送方式と転送時間との関係について説明する。図3は、転送方式ごとのデータ量に応じた転送時間を示す図である。図3に示す転送時間は、例えば、実験で算出されたデータである。転送方式としては、例えば、PIO方式と、DMA方式とがある。PIO方式とDMA方式とにおける具体的な転送方法については後述する。
 図3の第1推移線301~第4推移線304は、各転送方式における転送時間の推移を示す。より具体的には、第1推移線301および第2推移線302は、入力データ134の転送が複数回実行されたときの平均の転送時間(以下、「平均転送時間」とも称す。)を示す。平均転送時間はデータ量に応じて変化する。第1推移線301は、PIO方式による平均転送時間の推移を示す。第2推移線302は、DMA方式による平均転送時間の推移を示す。
 第3推移線303および第4推移線304は、入力データ134の転送が複数回実行されたときの最大の転送時間(以下、「最大転送時間」とも称す。)を示す。最大転送時間はデータ量に応じて推移する。第3推移線303は、PIO方式による転送時間の変化を示す。第4推移線304は、DMA方式による転送時間の変化を示す。
 最初に、第1推移線301および第2推移線302について説明する。例えば、バッファ132から記憶部114に転送される入力データ134のデータ量が50KBの場合に、第1推移線301における平均転送時間は12.5μsecとなり、第2推移線302における平均転送時間は14.0μsecとなる。入力データ134のデータ量が50KBの場合は、PIO方式による転送時間がDMA方式による転送時間よりも短くなる。これに対して、データ量が300KBの場合は、第1推移線301の平均転送時間は20.0μsecとなり、第2推移線302の平均転送時間は18.5μsecとなる。入力データ134のデータ量が300KBの場合は、DMA方式による転送時間がPIO方式による転送時間よりも短くなる。
 PIO方式とDMA方式とのどちらの転送時間が短くなるかは、例えば、データ量が190KB未満か否かによって変化する。より具体的には、データ量が190KB未満の場合は、PIO方式の転送時間がDMA方式の転送時間よりも短くなる。データ量が190KB以上の場合は、DMA方式の転送時間がPIO方式の転送時間よりも短くなる。上述のように、DMA方式の転送速度は、PIO方式による転送速度よりも速いが、DMA方式による転送が行われる場合、転送開始前にプロセッサ112とDMAコントローラ140との間において設定処理が行われる。このようにDMAコントローラ140が、DMA方式によるデータの転送を行う場合は、データの転送が開始される前に事前の処理が必要となる。したがって、データ量が少ない場合は、設定処理が行われないPIO方式によるデータの転送が、DMA方式によるデータの転送よりも短時間で終了する。
 次に、第3推移線303および第4推移線304について説明する。例えば、バッファ132から記憶部114に転送される入力データ134のデータ量が50KBの場合には、第3推移線303における最大転送時間は32.0μsecとなり、第4推移線304における最大転送時間は32.5μsecとなる。入力データ134のデータ量が50KBの場合は、PIO方式による転送時間がDMA方式による転送時間よりも短くなる。これに対して、データ量が300KBの場合は、第3推移線303の最大転送時間は40.0μsecとなり、第4推移線304の最大転送時間は42.5μsecとなる。入力データ134のデータ量が300KBの場合は、DMA方式による転送時間がPIO方式による転送時間よりも短くなる。
 PIO方式とDMA方式とのどちらの転送時間が短くなるかは、例えば、データ量が125KB未満か否かによって変化する。より具体的には、データ量が125KB未満の場合は、PIO方式の転送時間がDMA方式の転送時間よりも短くなる。データ量が125KB以上の場合は、DMA方式の転送時間がPIO方式の転送時間よりも短くなる。このように、入力データ134のデータ量に応じて、各転送方式における転送時間が異なる。そのため、制御装置100は、段取り替え等が行われたことで、通信データ20のデータ量が変化する場合は、データ量が変化した後の各転送方式による転送時間を計測する。
 これまで説明した図3の推移線は実験により計測された値である。これに対して、制御装置100は、PLC1のシステムの運用中に、演算処理部110の一機能である後述する計測部(例えば、図7に示す計測部116)により、各転送方式における平均転送時間が計測される。そして、制御装置100は、平均転送時間が短い転送方式を選択する。また、制御装置100は、PLC1のシステムの運用中に、計測部116により、各転送方式における転送時間のばらつきの程度が計測される。転送時間のばらつきの程度については後述する。計測部116は、平均転送時間および転送時間のばらつきの程度の少なくともいずれかを含む計測データを後述する判定部(例えば、図7に示す判定部117)に出力する。判定部117は、複数の転送方式のうちどの方式がPLC1のシステムの運用に適しているかを判定する。このように、制御装置100は、平均転送時間および転送時間のばらつきの程度の少なくともいずれかを計測して、複数の転送方式のうちどの方式がPLC1のシステムの運用に適しているかを判定する。
 [4.転送方式の説明]
 図4および図5を参照して、PIO方式およびDMA方式の転送方式について説明する。以下では、入力データ134の転送について説明するが、出力データ135の転送であってもこれらの転送方式のうち、データ量の変化に応じていずれかの転送方式が適用される。IOリフレッシュ処理が実行される場合に、入力データ134は、PIO方式およびDMA方式のいずれかの方式により、通信回路130のバッファ132から記憶部114に転送される。プロセッサ112は、記憶部114に格納された入力データ134を用いて、演算処理を実行する。
 図4は、PIO方式により入力データ134を転送する処理について説明する図である。図5は、DMA方式により入力データ134を転送する処理について説明する図である。図4を参照して、プロセッサ112は、通信回路130のバッファ132に格納された入力データ134を読み出す。プロセッサ112は、読み出した入力データ134を記憶部114に転送する。このようにPIO方式では、プロセッサ112を介して入力データ134を記憶部114に転送する。言い換えると、PIO方式では、DMAコントローラ140を介することなく、プロセッサ112が入力データ134をバッファ132から記憶部114へ転送する。なお、プロセッサ112を介して入力データ134を転送する方式を、FW(Firmware)方式と称してもよい。以下では、プロセッサ112を介して入力データ134を転送する方式をPIO方式と称して説明を続ける。
 図5を参照して、DMAコントローラ140は、通信回路130のバッファ132に格納された入力データ134を読み出す。DMAコントローラ140は、読み出した入力データ134を記憶部114に転送する。このようにDMA方式では、DMAコントローラ140を介して入力データ134を記憶部114に転送する。言い換えると、DMA方式では、プロセッサ112を介することなく、DMAコントローラ140が入力データ134をバッファ132から記憶部114へ転送する。なお、DMA方式による処理が実行される前に、プロセッサ112からDMAコントローラ140に対して設定指示が出力される。プロセッサ112からの設定指示を受け取ったDMAコントローラ140は、処理を開始するために必要な設定を行った後に、バッファ132に格納された入力データ134の読み出しを開始する。
 制御装置100は、PIO方式とDMA方式とのうち、いずれかの転送方式によりバッファ132に一時的に格納された入力データ134を記憶部114に転送する。PIO方式は、演算処理部110に含まれるプロセッサ112が入力データ134を記憶部114に転送する方式である。DMA方式は、DMAコントローラ140が入力データ134を記憶部114に転送する方式である。そして、入力データ134を転送するIOリフレッシュ処理が実行される場合には、一定周期内に処理を完了する必要がある。演算処理部110は、バッファ132に格納された入力データ134をPIO方式(以下、「第1転送方式」とも称す。)により記憶部114に転送した時間(以下、「第1転送時間」とも称す。)を計測する。また、演算処理部110は、バッファ132に格納された入力データ134をDMA方式(以下、「第2転送方式」とも称す。)により記憶部114に転送した時間(以下「第2転送時間」とも称す。)を計測する。演算処理部110は、第1転送時間と第2転送時間とのうち、例えば、短い時間となる転送方式を、入力データ134を転送する転送方式として選択する。
 [5.第1転送時間および第2転送時間]
 図6を参照して、第1転送時間および第2転送時間と、プライマリ周期タスク1221との対応関係について説明する。図6は、プライマリ周期タスク1221の一例を示す図である。プライマリ周期タスク1221は、IOリフレッシュ処理を含む。また、プライマリ周期タスク1221は、IOリフレッシュ処理後に、最優先で行われる演算処理およびユーザプログラム等を含む。例えば、IOリフレッシュ処理、演算処理、およびユーザプログラムが実行される制御周期T1のうち、第1転送方式による第1転送時間、または、第2転送方式による第2転送時間は、IOリフレッシュ処理が行われる周期Taに含まれる時間である。これに対して、第1転送時間または第2転送時間は、IOリフレッシュ処理と演算処理とが行われる周期Tbに含まれる時間であってもよい。演算処理は、プロセッサ112がバッファ132から記憶部114に転送された入力データ134を用いて実行する処理である。
 このように、入力データ134をバッファ132から記憶部114に転送する時間は、IOリフレッシュ処理が行われる時間を含む周期Taにおける時間、および、IOリフレッシュ処理と演算処理の時間とを含む周期Tbにおける時間のいずれかとなる。より具体的には、第1転送時間は、例えば、PIO方式により入力データ134がバッファ132から記憶部114に転送される転送時間(周期Taに含まれる時間)と、当該転送時間および演算処理が実行される時間を含む処理実行時間(周期Tbに含まれる時間)とのうちのいずれかの時間となる。また第2転送時間は、例えば、DMA方式により入力データ134がバッファ132から記憶部114に転送される転送時間(周期Taに含まれる時間)と、当該転送時間および演算処理が実行される時間を含む処理実行時間(周期Tbに含まれる時間)とのうちのいずれかの時間となる。これにより、PLC1は、プライマリ周期タスク1221において、各転送方式においてIOリフレッシュ処理のみの時間、または、IOリフレッシュ処理および演算処理を含む時間を転送時間として計測できる。したがって、以下、第1転送時間および第2転送時間と称する場合は、IOリフレッシュ処理のみの時間(周期Taに含まれる時間)と、IOリフレッシュ処理および演算処理を含む時間(周期Tbに含まれる時間)とのいずれの時間であってもよい。
 なお、周期Tcは、ユーザプログラム124を含む時間である。制御周期T1が予め定められた時間(例えば、2,000μsec)であるため、周期Tcに含まれるユーザプログラム124の数が少ない場合は、周期Taおよび周期Tbの少なくともいずれかの上限時間を長くすることができる。例えば、ユーザプログラムの数が0(ゼロ)の場合は、制御周期T1=周期Tbとすることもできる。これに対して、ユーザプログラム124の数が増加すると、制御周期T1は、予め定められた時間であるため、周期Taおよび周期Tbの少なくともいずれかの時間を短くする必要がある。したがって、演算処理部110の選択部118は、IOリフレッシュ処理における入力データ134の転送時間が短くなる転送方式を選択することで、転送時間の短縮が可能となる。これにより、PLC1は、ユーザプログラム124が実行される時間をより多く確保できる。
 以下では、転送方式を選択する条件および機能について説明する。図7は、予め定められた条件に基づいて、入力データ134の転送方式を選択する機能について説明する機能ブロック図である。演算処理部110は計測部116、判定部117、選択部118およびユーザプログラム124を含む。計測部116、判定部117および選択部118は、例えば、システムプログラム122により実現される機能である。
 ユーザプログラム124は、計測部116に計測指示を出力する。スケジューラ(図示せず)において予め定められた順に処理が実行され、ユーザプログラム124の処理が実行されるタイミングとなったときに当該プログラムが実行される。ユーザプログラム124の処理が実行されたことで、計測指示を受け付けた計測部116は、PIO方式およびDMA方式のそれぞれの転送方式による入力データ134の転送時間を算出する。計測部116は、高精度タイマ160によりカウントされる値に基づいて、入力データ134がバッファ132から読み出されて、記憶部114へ転送されるまでの時間を各方式で計測する。
 そして、計測部116は、各方式における入力データ134の転送を複数回実行して転送時間を算出する。計測部116は、複数の転送時間に基づいて、各方式の平均の転送時間を示す平均転送時間を算出する。計測部116は、各転送方式の平均転送時間を含む計測データを判定部117に送信する。
 判定部117は、計測データに基づいて、予め定められた判定条件を満たされたか否かを判定する。判定条件は、例えば、平均転送時間が短い転送方式を選択する条件である。判定部117は、PIO方式による平均転送時間と、DMA方式による平均転送時間とを比較して、いずれの方式の平均転送時間が短いかを判定する。例えば、判定部117はPIO方式の平均転送時間が、DMA方式の平均転送時間よりも短いと判定した場合に、その判定結果を選択部118に出力する。
 判定結果を受け付けた選択部118は、現在設定されている転送方式がDMA方式のときは、入力データ134の新たな転送方式としてPIO方式を選択する。現在設定されている転送方式がPIO方式のときは、判定結果を受け付けた選択部118は、現在選択されているPIOの転送方式により引き続き転送を行う。このように、PLC1は、各方式における平均転送時間に応じていずれかの転送方式を選択できる。PLC1は、システムの運用中に、データ量に応じた最適な転送方式を選択できる。また、PLC1は、システムの運用中に、入力データ134をバッファ132から記憶部114に転送する時間が短い転送方式を選択でき、IOリフレッシュ処理に要する時間を短縮できる。さらに、PLC1は、IOリフレッシュ処理における処理時間の短縮により、IOリフレッシュ処理以外の処理で、プライマリ周期タスクにおいて実行される処理(例えば、ユーザプログラムによる処理)の数を増やすことができる。
 また、判定部117における判定条件を例えば、転送時間のばらつき度合いとしてもよい。より具体的には、判定部117は、例えば、小さいばらつき度合いの転送時間となる転送方式を選択可能な判定条件に基づいて、当該条件を満たすか否かを判定する。ばらつき度合いとは、例えば、複数の転送時間の標準偏差である。ばらつきの度合いが大きいと、IOリフレッシュ処理の処理時間が定まらないため、一定周期内に処理を完了できない可能性がある。
 計測部116は、複数の転送時間に基づいて、各方式の転送時間のばらつき度合いを算出する。計測部116は、例えば複数の転送時間の標準偏差に基づいてばらつき度合いを算出する。計測部116は、各転送方式のばらつき度合いを含む計測データを判定部117に送信する。
 判定部117は、PIO方式によるばらつき度合いと、DMA方式によるばらつき度合いとを比較して、いずれの方式のばらつき度合いが小さいかを判定する。例えば、判定部117はPIO方式によるばらつき度合いがDMA方式によるばらつき度合いよりも小さいと判定した場合に、その判定結果を選択部118に出力する。判定結果を受け付けた選択部118は、現在設定されている転送方式がDMA方式のときは、入力データ134の新たな転送方式としてPIO方式を選択する。
 現在設定されている転送方式がPIO方式のときは、判定結果を受け付けた選択部118は、現在選択されているPIOの転送方式により引き続き転送を行う。このように、PLC1は、各方式における転送時間のばらつきの度合いに応じていずれかの転送方式を選択できる。また、PLC1は、入力データ134をバッファ132から記憶部114に転送する時間のばらつきが小さい転送方式を選択でき、IOリフレッシュ処理を一定周期で確実に終了させることできる。さらに、IOリフレッシュ処理が一定周期で確実に終了することで、PLC1は、プライマリ周期タスクに含まれる他の処理が未実行となることを防止できる。
 [6.第1の実施の形態における転送方式の選択処理]
 図8を参照して、制御装置100の制御構造について説明する。図8は、演算処理部110が、予め定められた条件を満たす転送方式を選択する処理を示すフローチャートである。ステップS1001において、演算処理部110は、ユーザプログラム124に基づく計測指示を受け付ける。計測指示は、例えば、制御装置100に電力が供給(電源ON)された場合、または、機能ユニット200の構成が変更された(「段取り替え」が行われた)場合に出力される。
 ステップS1002において、演算処理部110は、第1転送方式(例えば、PIO方式)による転送時間の計測を開始する。演算処理部110は、高精度タイマ160を用いて、1周期分の入力データ134の転送における開始タイミングを検出する。
 ステップS1003において、演算処理部110は、計測が終了したか否かを判定する。演算処理部110は、PIO方式による転送時間を予め定められた回数(例えば、2,000回)計測する。演算処理部110は、1周期分の入力データ134の転送における終了タイミングを検出した後に、予め定められた回数の計測が終了したと判定すると(ステップS1003においてYES)、制御をステップS1004に切替える。そうでない場合には(ステップS1003においてNO)、演算処理部110は、制御をステップS1003に切替えて、予め定められた回数になるまで計測を継続する。
 なお、演算処理部110は、上述のように、高精度タイマ160を用いて、1周期分の入力データ134の転送における開始タイミングのカウント値と、カウントが開始されてから、同じ1周期分の入力データ134の転送が終了するまでの終了タイミングのカウント値とを取得する。演算処理部110は、1周期分の転送時間の計測における開始タイミングのカウント値と、終了タイミングのカウント値との差を、第1転送方式による第1転送時間として検出する。
 ステップS1004において、演算処理部110は、第2転送方式(例えば、DMA方式)による計測を開始する。演算処理部110は、高精度タイマ160を用いて、1周期分の入力データ134の転送における開始タイミングを検出する。
 ステップS1005において、演算処理部110は、計測が終了したか否かを判定する。演算処理部110は、DMA方式による転送時間を予め定められた回数(例えば、2,000回)計測する。演算処理部110は、計測が終了したと判定すると(ステップS1005においてYES)、制御をステップS1006に切替える。そうでない場合には(ステップS1005においてNO)、演算処理部110は、制御をステップS1005に切替えて、予め定められた回数になるまで計測を継続する。
 なお、演算処理部110は、上述のように、高精度タイマ160を用いて、1周期分の入力データ134の転送における開始タイミングのカウント値と、カウントが開始されてから、同じ1周期分の入力データ134の転送が終了するまでの終了タイミングのカウント値とを取得する。演算処理部110は、1周期分の計測における開始タイミングのカウント値と、終了タイミングのカウント値との差を、第2転送方式による第2転送時間として検出する。
 ステップS1006において、演算処理部110は、第1転送時間および第2転送時間と、第1転送時間のばらつき度合いおよび第2転送時間のばらつき度合いとを含む計測データを出力する。演算処理部110は、計測データを判定部117に出力する。
 ステップS1007において、演算処理部110は、予め定められた条件が満たされたことに応答して、転送方式を選択する。演算処理部110は、例えば平均転送時間が短い条件を満たした転送方式を選択する。より具体的には、演算処理部110は、転送方式が第1転送方式による平均転送時間と、第2転送方式による平均転送時間とのうち、第1転送方式による平均転送時間が短いと判定すると、現在設定されている転送方式が第2転送方式の場合は、第1転送方式を以降の転送方式として選択する。演算処理部110は、現在設定されている転送方式が第1転送方式の場合は、新たな転送方式の選択は行わずに、現在の方式の設定を継続させる。
 これにより、PLC1は、入力データ134をバッファ132から記憶部114に転送する時間を短縮できる。また、PLC1は、例えば、ばらつき度合いが小さい転送方式を選択することもできる。これにより、PLC1は、入力データ134をバッファ132から記憶部114に転送する処理を定周期内に確実に終了できる。
 なお、演算処理部110は、平均転送時間に替えてまたは第1転送方式による転送時間のばらつきの程度と、第2転送方式による転送時間のばらつきの程度とに基づいて、転送方式を選択してもよい。さらに、演算処理部110は、平均転送時間およびばらつきの程度の両方により転送方式を選択してもよい。
 <第2の実施の形態>
 第2の実施の形態に係るPLC1は、前述の実施の形態に係るPLC1と同一のハードウェア構成を用いて実現される。したがって、同一のハードウェア構成の説明は繰り返さない。
 第1の実施の形態では、演算処理部110に含まれる計測部116、判定部117および選択部118はシステムプログラム122によって実現されることを説明した。これに対して、計測部116、判定部117および選択部118の機能はユーザプログラム124によって実現されてもよい。ユーザが後述するサポート装置300を用いて、予めファンクションブロック等を作成し、作成したユーザプログラム124を制御装置100に送信することで、制御装置100において上記機能が実現されるようにしてもよい。以下、計測部116、判定部117および選択部118の機能を有するユーザプログラム124の具体例について説明する。
 [ユーザプログラム124の具体例]
 図9を参照して、選択部118の機能等を実現するユーザプログラム124の具体例について説明する。図9は、転送方式を選択するユーザプログラム124の一例を示す図である。図8の例では、ユーザプログラム124は、ラダープログラムで規定される。当該ユーザプログラム124は、例えば、制御装置100へ電力が供給されていない状態から電力の供給が開始された場合、または、機能ユニット200の構成が変更された(段取り替えが行われた)場合に、第1転送時間と第2転送時間との計測を開始する。第1転送時間および第2転送時間の計測が終了した後に、転送方式が選択された場合は、選択された新しい転送方式によりデータの転送が実行される。このように、PLC1は、システム運用中において、現在設定されている転送方式とは別の転送方式を選択される可能性があるタイミングで、転送時間の計測を行える。
 ユーザプログラム124は、入力要素IN0およびIN1と、ファンクションブロックFB0~FB2と、出力要素OUT0からOUT2とで規定されている。
 入力要素IN0およびIN1の値は、割付けられている変数に応じて変化する。より具体的には、入力要素IN0には、変数「ChengeTrigger」が割り当てられている。変数「ChengeTrigger」はBOOL型であり、初期値は、False」(=OFF)である。変数「ChangeTrigger」の値は、例えば、制御装置100が起動されたことに基づいて、「True」(=ON)に変化する。その他の場合、変数「ChangeTrigger」の値は、「False」(=OFF)となる。
 入力要素IN1には、変数「SettingTrigger」が割り当てられている。変数「SettingTrigger」は、BOOL型であり、初期値は、「False」(=OFF)である。また、変数「SettingTrigger」は、ファンクションブロックFB0の出力に関連付けられている。ファンクションブロックFB0の出力が「True」(=ON)となると、入力要素IN1の値は、「True」(=ON)となる。一方で、ファンクションブロックFB0の出力が「False」(=OFF)となると、入力要素IN1の値は、「False」(=OFF)となる。
 次にファンクションブロックFB0、FB1、および、FB2についての詳細な説明を行う。ファンクションブロックFB0は、入力データ134の転送時間を計測するためのプログラムであり、ユーザプログラム124に含まれる命令に相当する。変数「ChangeTrigger」が「True」(=ON)になったことに基づいて、有効を示す信号「True」(=ON)がファンクションブロックFB1の入力部に入力される。このことに基づいて、ファンクションブロックFB0は、PIO方式による第1転送時間T11と、DMA方式による第2転送時間T12との計測を開始する。
 ファンクションブロックFB1は、転送方式を選択するためのプログラムであり、ユーザプログラム124に含まれる命令に相当する。ファンクションブロックFB0により計測された第1転送時間T11が、第2転送時間T12よりも長いことに基づいて、有効を示す信号「True」(=ON)がファンクションブロックFB1の入力部に入力される。このことに基づいて、ファンクションブロックFB1は、現在の転送方式がPIO方式M1の場合に、DMA方式M2を選択する。なお、ファンクションブロックFB1は、現在の転送方式がDMA方式M2の場合は他の方式を選択することなく、現在の転送方式の設定を維持する。
 ファンクションブロックFB2は、転送方式を選択するためのプログラムであり、ユーザプログラム124に含まれる命令に相当する。ファンクションブロックFB0により計測された第1転送時間T11が、第2転送時間T12よりも短いことに基づいて、有効を示す信号「True」(=ON)がファンクションブロックFB2の入力部に入力される。このことに基づいて、ファンクションブロックFB2は、現在の転送方式がDMA方式M2の場合に、PIO方式M1を選択する。なお、ファンクションブロックFB1は、現在の転送方式がPIO方式M1の場合は他の方式を選択することなく、現在の転送方式の設定を維持する。
 出力要素OUT0~OUT2の値は、それぞれ、関連付けられているファンクションブロックの出力値に応じて変化する。出力要素OUT0には、変数「SettingTrigger」が割付けられている。また、出力要素OUT0は、ファンクションブロックFB0の出力に関連付けられている。その結果、出力要素OUT0の値は、出力の値に応じて変化する。
 出力要素OUT1には、変数「Done0」が割付けられている。また、出力要素OUT1は、ファンクションブロックFB1の出力に関連付けられている。その結果、出力要素OUT1の値は、ファンクションブロックFB1の出力の値に応じて変化する。
 出力要素OUT2には、変数「Done1」が割付けられている。また、出力要素OUT2は、ファンクションブロックFB2の出力に関連付けられている。その結果、出力要素OUT2の値は、ファンクションブロックFB2の出力の値に応じて変化する。
 以上のようにして、計測データ(例えば、計測時間)に基づいて、ファンクションブロックFB1よりDMA方式が選択され、ファンクションブロックFB2によりPIO方式が選択される。
 <第3の実施の形態>
 第3の実施の形態に係るPLC1aは、前述の実施の形態に係るPLC1と一部が異なる構成であり残りは同一の構成を用いて実現される。したがって、同一の構成の説明は繰り返さない。以下、異なる構成と処理とについて説明する。
 第1の実施の形態では、制御装置100は、予め定められた条件が満たされたことに応答して、転送方式を選択した。これに対して、第3の実施の形態では、ユーザからの指示に応答して、転送方式を選択する。
 [PLC1aの装置構成]
 図10は、第2の実施の形態に係るPLC1aの要部構成を示す模式図である。PLC1aは、典型的には、制御装置100と、1または複数の機能ユニット200と、サポート装置300とから構成される。サポート装置300は、制御装置100と電気的に接続され、制御装置100により計測された計測データを受け付ける。サポート装置300は、表示部310を含み、計測データに基づく画像を表示する。表示部310に表示される画像については後述する。
 図11を参照して、ユーザからの指示に応答して、転送方式を選択可能とする機能について説明する。図11は、ユーザからの指示に応答して、入力データ134の転送方式を選択する機能を説明する機能ブロック図である。演算処理部110は計測部116、選択部118およびユーザプログラム124を含む。計測部116および選択部118の機能は、例えばシステムプログラム122によって実現される。演算処理部110の計測部116は、計測データをサポート装置300に送信する。計測データを受信したサポート装置300は、表示部310に計測データに基づく画像を表示する。
 演算処理部110の選択部118は、サポート装置300を操作するユーザからの指示に基づいて、転送方式を選択可能とする。より具体的には、選択部118は、サポート装置300における表示部310に計測データに基づく画像を表示する。サポート装置300は、表示部310に表示された画像をみたユーザが選択した転送方式についての選択指示を選択部118に送信する。選択部118は、選択指示に基づいて転送方式を選択する。これにより、PLC1は、システムの運用中にデータ量に応じた最適な転送方式を選択できる。より具体的には、PLC1は、システム運用中に、入力データ134をバッファ132から記憶部114に転送する時間が短い転送方式の選択を指示するユーザからの指示に応答して転送方式を選択できる。また、PLC1は、IOリフレッシュ処理に要する時間を短縮できる。また、PLC1は、IOリフレッシュ処理における処理時間の短縮により、IOリフレッシュ処理以外でプライマリ周期タスクにおいて実行される処理(例えば、ユーザプログラムによる処理)を増やすことができる。
 [計測データに基づく画像]
 図12および図13を参照して、サポート装置300の表示部310に表示される画像について説明する。より具体的には、第1転送方式(例えば、PIO方式)による転送時間を含む計測データに基づく画像と、第2転送方式(例えば、DMA方式)による転送時間を含む計測データに基づく画像とについて説明する。図12は、第1転送方式による転送時間を含む計測データに基づいて生成された画像である。図13は、第2転送方式による転送時間を含む計測データに基づいて生成された画像である。
 図12を参照して、第1画像80は、演算処理部110が第1転送方式による転送を例えば、約2,000回実測した結果を示す画像である。第1画像80は、第1表示領域81と第2表示領域82とを含む。第1表示領域81には、タスク実行時間(Task Execution Time)を示す像が含まれる。
 タスク実行時間の全体の時間は、図2または図7を用いて説明したプライマリ周期タスク1221の制御周期T1に対応する時間である。すなわち、タスク実行時間は、少なくとも、IOリフレッシュ処理を含む時間を示す。より具体的には、タスク実行時間は、あるデータ量(例えば、50KB)がバッファ132に格納されている場合に、入力データ134の転送時間を複数回計測したときに、計測データのうち最も転送時間が短い最小転送時間(Min)が表示される。最小転送時間は、例えば400μsecである。また、複数回計測したときの計測データの平均転送時間(Average)が表示される。平均転送時間は、例えば450μsecである。さらに、計測データのうち、最も転送時間が長い最大転送時間(Max)が表示される。最大転送時間は、例えば550μsecである。設定時間(Set period)は、制御周期T1に対応する時間であり、通信データ20の転送において許容される最大の時間(例えば、2,000μsec)を示す。
 このように、サポート装置300の表示部310は、通信データ20(例えば、入力データ134)の転送において許容される最大の時間と、PIO方式により入力データ134が転送されたときに実測された時間とを表示する。実測された時間は、例えば最小転送時間、平均転送時間および最大転送時間の少なくともいずれかである。サポート装置300は、計測データに基づいて、通信データ20の転送において許容される最大の時間と、PIO方式により通信データが転送されたときに実測された転送時間とを比較可能な第1画像80を表示部310に表示する。
 第2表示領域82は、縦軸が時間(μsec)、横軸が実測回数(回)を示す。第2表示領域82は、転送時間を複数回計測したときの計測データを含む。実測値1001は、最小転送時間(例えば、400μsec)を示す。実測値1002は、最大転送時間(例えば、550μsec)を示す。平均線1003は、平均転送時間(例えば、450μsec)を示す。第2表示領域82における最小転送時間を示す実測値1001、最大転送時間を示す実測値1002および平均転送時間を示す平均線1003は、第1表示領域81における最小転送時間、最大転送時間および平均転送時間に対応する値である。
 PLC1は、サポート装置300の表示部310に第1転送方式による転送時間の平均転送時間を含む第1画像80を表示させることで、PIO方式で入力データ134を転送したときの平均時間を、ユーザが一目で把握できる画像を提供できる。また、PLC1は、サポート装置300の表示部310に第1転送方式による最小転送時間および最大転送時間と、複数の実測値とを含む第1画像80を表示することで、第1転送方式で入力データ134を転送したときの転送時間のばらつきの程度を、ユーザが一目で把握できる画像を提供できる。
 なお、第2表示領域82における実測値1001、実測値1002および平均線1003は、他の実測値と識別できるような態様で表示してもよい。より具体的には、実測値1001、実測値1002および平均線1003を他の実測値と比べて、例えば、色、形および大きさ等の少なくともいずれかを他の実測値と比べて変化させてもよい。また、実測値1001、実測値1002および平均線1003を点滅させる表示を行ってもよい。
 図13を参照して、第2画像90は、演算処理部110がDMA方式による転送時間を、例えば約2,000回実測した結果を示す画像である。第2画像90は、第1表示領域91と第2表示領域92とを含む。第1表示領域91には、タスク実行時間(Task Execution Time)を示す像が含まれる。
 タスク実行時間の全体の時間は、例えば、図2または図7を用いて説明したプライマリ周期タスク1221の制御周期T1に対応する時間である。すなわち、タスク実行時間は、少なくとも、IOリフレッシュ処理を含む時間を示す。より具体的には、タスク実行時間は、あるデータ量(例えば、50KB)バッファ132に格納されている場合に、入力データ134の転送時間を複数回計測したときに、計測データのうち最も転送時間が短い最小転送時間(Min)が表示される。最小転送時間は、例えば880μsecである。また、複数回計測したときの計測データの平均転送時間(Average)が表示される。平均転送時間は、例えば900μsecである。さらに、計測データのうち、最も転送時間が長い最大転送時間(Max)が表示される。最大転送時間は、例えば920μsecである。設定時間(Set period)は、制御周期T1に対応する時間であり、通信データ20の転送において許容される最大の時間(例えば、2,000μsec)を示す。
 このように、サポート装置300の表示部310は、通信データ20(例えば、入力データ134)の転送において許容される最大の時間と、第2転送方式により入力データ134が転送されたときに実測された時間とを表示する。実測された時間は、例えば最小転送時間、平均転送時間および最大転送時間の少なくともいずれかである。このように、サポート装置300は、計測データに基づいて、通信データ20の転送において許容される最大の時間と、第2転送方式により通信データが転送されたときに実測された転送時間とを比較可能な画像を表示部310に表示する。
 第2表示領域92は、縦軸が時間(μsec)、横軸が実測回数(回)を示す。第2表示領域92は、転送時間を複数回計測したときの計測データを含む。実測値1101は、最小転送時間(例えば、880μsec)を示す。実測値1102は、最大転送時間(例えば、920μsec)を示す。平均線1103は、平均転送時間(例えば、900μsec)を示す。第2表示領域92における最小転送時間を示す実測値1101、最大転送時間を示す実測値1102および平均転送時間を示す平均線1103は、第1表示領域91における最小転送時間、最大転送時間および平均転送時間に対応する値である。
 PLC1は、サポート装置300の表示部310に第2転送方式による転送時間の平均転送時間を含む第2画像90を表示させることで、第2転送方式により入力データ134を転送したときの平均時間を、ユーザが一目で把握できる画像を提供できる。また、PLC1は、サポート装置300の表示部310に第2転送方式による最小転送時間および最大転送時間と、複数の実測値とを含む第2画像90を表示することで、第2転送方式により入力データ134を転送したときの転送時間のばらつきの程度を、ユーザが一目で把握できる画像を提供できる。
 なお、第2表示領域92における実測値1101、実測値1102および平均線1103は、他の実測値と識別できるような態様で表示してもよい。より具体的には、実測値1101、実測値1102および平均線1103を他の実測値と比べて、例えば、色、形および大きさ等の少なくともいずれかを他の実測値と比べて変化させてもよい。また、実測値1101、実測値1102および平均線1103を点滅させる表示を行ってもよい。
 [サポート装置300の装置構成]
 図14は、本実施の形態に係る制御システムを構成するサポート装置300のハードウェア構成例を示すブロック図である。図14を参照して、サポート装置300は、CPUまたはMPUなどのプロセッサ311と、光学ドライブ315と、主記憶装置306と、二次記憶装置308と、表示部310と、USB(Universal Serial Bus)コントローラ312と、ローカルネットワークコントローラ314と、入力部316と、表示部310とを含む。これらのコンポーネントはバス320を介して接続される。
 プロセッサ311は、二次記憶装置308に格納された各種プログラムを読み出して、主記憶装置306に展開して実行することで、後述するような各種処理を実現する。プロセッサ311は、制御装置100から取得した計測データ326に基づいて、表示部310に表示する画像を生成する。
 二次記憶装置308は、例えば、HDD(Hard Disk Drive)やSSD(Flash Solid State Drive)などで構成される。二次記憶装置308は、典型的には、ユーザプログラム124の作成、システム構成の定義、各種パラメータの設定などを行うための開発プログラム322と、各種変数を指定するためのパラメータ設定ツール324と、制御装置100から取得した計測データ326とを含む。また、二次記憶装置308には、OSおよび他の必要なプログラムが格納されてもよい。サポート装置300は、光学ドライブ315を有しており、コンピュータ読取可能なプログラムを非一過的に格納する記録媒体305(例えば、DVD(Digital Versatile Disc)などの光学記録媒体)から、その中に格納されたプログラムが読み取られて二次記憶装置308などにインストールされてもよい。
 サポート装置300で実行される各種プログラムは、コンピュータ読取可能な記録媒体305を介してインストールされてもよいが、ネットワーク上のサーバ装置などからダウンロードする形でインストールするようにしてもよい。また、本実施の形態に係るサポート装置300が提供する機能は、OSが提供するモジュールの一部を利用する形で実現される場合もある。
 表示部310は、プロセッサ311が二次記憶装置308に格納された計測データ326に基づいて生成した、第1画像80および第2画像90のうちの少なくともいずれかを表示する。
 USBコントローラ312は、USB接続を介して制御装置100との間のデータの遣り取りを制御する。ローカルネットワークコントローラ314は、任意ネットワークを介した他の装置との間のデータの遣り取りを制御する。
 入力部316は、キーボードやマウスなどで構成され、ユーザ操作を受け付ける。表示部310は、ディスプレイ、各種インジケータ、プリンタなどで構成され、プロセッサ311からの処理結果などを出力する。
 図3には、プロセッサ311がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 [第2の実施の形態における転送方式の選択処理]
 図15は、演算処理部110が、ユーザからの指示に応答して、転送方式を選択する処理を示すフローチャートである。ステップS1006において、演算処理部110は、第1転送時間および第2転送時間と、第1転送時間のばらつき度合いおよび第2転送時間のばらつき度合いとを含む計測データを出力する。演算処理部110は、計測データをサポート装置300に出力する。
 ステップS2001において、演算処理部110は、サポート装置300からのユーザからの指示を受け付けたか否かを判定する。演算処理部110は、ユーザからの指示を受け付けたと判定した場合には(ステップS2001においてYES)、制御をステップS2002に切替える。そうでない場合には(ステップS2001においてNO)、演算処理部110は、制御をステップS1003に切替えて、ユーザからの指示を受け付けるまで処理を継続する。なお、予め定められた時間を経過してもユーザからの指示が受け付けられなかった場合は、演算処理部110は、図15に示す転送方式の選択処理を終了する。
 ステップS2002において、演算処理部110は、ユーザからの指示に応答して、複数の転送方式のうち、いずれかの転送方式を選択する。より具体的には、演算処理部110は、ユーザからの指示が第1転送方式を選択する指示である場合に、現在設定されている転送方式が第2転送方式のときは、第1転送方式を選択する。演算処理部110は、現在設定されている転送方式が第1転送方式の場合は、新たな転送方式の選択は行わずに、現在の方式の設定を継続させる。
 <変形例>
 第1および第2の実施の形態において、演算処理部110のプロセッサ112がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。あるいは、制御装置100の主要部を、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 第2の実施の形態において、PLC1は、制御装置100、機能ユニット200およびサポート装置300がそれぞれ別体として構成されているが、これらの機能の全部または一部を単一の装置に集約するような構成を採用してもよい。
 第2の実施の形態において、第1画像80および第2画像90はそれぞれ別々に表示部310に表示される説明を行ったが、第1画像80および第2画像90を並べて表示部310に表示してもよい。
 第2の実施の形態において、第1画像80および第2画像90において説明した最小転送時間、最大転送時間、平均転送時間、設定時間等の各種の値は一例であり、他の値であってもよい。
 <付記>
 上述したような本実施の形態は、以下のような技術思想を含む。
 [構成1]
 1または複数の機能ユニット(200)と、
 前記1または複数の機能ユニット(200)間で巡回的に伝送される通信データ(20)を遣り取りする制御装置(100)とを備え、
 前記制御装置(100)は、
 前記通信データ(20)を一時的に格納する第1記憶部(132)を有する通信回路(130)と、
 複数の転送方式のいずれかに従って、前記第1記憶部(132)から転送される前記通信データ(20)を格納する第2記憶部(114)と、
 前記第2記憶部(114)に格納された前記通信データ(20)を用いて、演算処理を実行する演算処理部(110)と、
 前記演算処理部(110)と前記通信回路(130)とに接続されたDMAコントローラ(140)とを備え、
 前記複数の転送方式は、前記演算処理部(110)が前記通信データ(20)を転送する第1転送方式と、前記DMAコントローラ(140)が前記通信データ(20)を転送する第2転送方式とを含み、
 前記演算処理部(110)は、ユーザからの指示に従って、または、予め定められた条件に従って、前記第1転送方式と前記第2転送方式とのうち、いずれかの転送方式を選択する、制御システム。
 [構成2]
 前記演算処理部(110)は、
  前記第1転送方式により前記通信データ(20)が前記第2記憶部(114)に転送される時間と、該転送される時間および前記演算処理が実行される時間とのうちのいずれかの第1転送時間と、前記第2転送方式により前記通信データ(20)が前記第2記憶部(114)に転送される時間と、該転送される時間および前記演算処理が実行される時間とのうちのいずかの第2転送時間とを計測し、
  前記第1転送時間と第2転送時間とを含む計測データを出力する、構成1に記載の制御システム。
 [構成3]
 前記演算処理部(110)は、前記制御装置(100)への電力の供給が開始された場合、または、前記制御装置(100)に接続された前記1または複数の機能ユニット(200)の構成が変更された場合に、前記第1転送時間と前記第2転送時間とを計測する、構成2に記載の制御システム。
 [構成4]
 前記計測データは、前記第1転送方式による前記通信データ(20)における転送が、複数回実行されたときの前記第1転送時間における平均第1転送時間と、前記第2転送方式による前記通信データ(20)における転送が、複数回実行されたときの前記第2転送時間における平均第2転送時間とを含み、
 前記演算処理部(110)は、前記平均第1転送時間で転送が実行される前記第1転送方式と、前記平均第2転送時間で転送が実行される前記第2転送方式とのうち、短い時間で転送が実行される転送方式を選択可能する、構成2または3に記載の制御システム。
 [構成5]
 前記計測データは、前記第1転送方式による前記通信データ(20)における転送が、複数回実行されたときの前記第1転送時間におけるばらつき度合いと、前記第2転送方式による前記通信データ(20)における転送が、複数回実行されたときの前記第2転送時間におけるばらつき度合いとを含み、
 前記演算処理部(110)は、前記第1転送時間におけるばらつき度合いで転送が実行される第1転送方式と、前記第2転送時間におけるばらつき度合いで転送が実行される第2転送方式のうち、小さいばらつきの度合いで転送が実行される転送方式を選択可能とする、構成2または3に記載の制御システム。
 [構成6]
 前記計測データを受け付けるサポート装置(300)をさらに備え、
 前記サポート装置(300)は、受け付けた前記計測データに基づいて、前記通信データ(20)の転送において許容される最大の時間と、前記第1転送方式および前記第2転送方式のうち、いずれかの転送方式により前記通信データ(20)が転送されたときに実測された時間とを比較可能な画像を表示する表示部(310)を含む、構成2~5のいずれか1項に記載の制御システム。
 [構成7]
 1または複数の機能ユニット(200)間で巡回的に伝送される通信データ(20)を遣り取りする制御装置(100)であって、
 前記通信データ(20)を一時的に格納する第1記憶部(132)を有する通信回路(130)と、
 複数の転送方式のいずれかに従って、前記第1記憶部(132)から転送される前記通信データ(20)を格納する第2記憶部(114)と、
 前記第2記憶部(114)に格納された前記通信データ(20)を用いて、演算処理を実行する演算処理部(110)と、
 前記演算処理部(110)と前記通信回路(130)とに接続されたDMAコントローラ(140)とを備え、
 前記複数の転送方式は、前記演算処理部(110)が前記通信データ(20)を転送する第1転送方式と、前記DMAコントローラ(140)が前記通信データ(20)を転送する第2転送方式とを含み、
 前記演算処理部(110)は、ユーザからの指示に従って、または、予め定められた条件に従って、前記第1転送方式と前記第2転送方式とのうち、いずれかの転送方式を選択する、制御装置。
 今回開示された実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内での全ての変更が含まれることが意図される。
 2 ローカルバス、20 通信データ、80 第1画像、81,91 第1表示領域、82,92 第2表示領域、90 第2画像、100 制御装置、110 演算処理部、112,311 プロセッサ、114 記憶部、116 計測部、117 判定部、118 選択部、120 ストレージ、122 システムプログラム、124 ユーザプログラム、126 コンフィギュレーション、130 通信回路、132 バッファ、134 入力データ、135 出力データ、140,312 コントローラ、160 高精度タイマ、200 機能ユニット、210 通信処理部、300 サポート装置、301 第1推移線、302 第2推移線、303 第3推移線、304 第4推移線、305 記録媒体、306 主記憶装置、308 二次記憶装置、310 表示部、314 ローカルネットワークコントローラ、315 光学ドライブ、316 入力部、320 バス、322 開発プログラム、324 パラメータ設定ツール、1001,1002,1101,1102 実測値、1003,1103 平均線、FB0,FB1,FB2 ファンクションブロック、IN0,IN1 入力要素、OUT0,OUT1,OUT2 出力要素、Ta,Tb 周期、T1,T2 制御周期、T11 第1転送時間、T12 第2転送時間。

Claims (7)

  1.  1または複数の機能ユニットと、
     前記1または複数の機能ユニット間で巡回的に伝送される通信データを遣り取りする制御装置とを備え、
     前記制御装置は、
      前記通信データを一時的に格納する第1記憶部を有する通信回路と、
      複数の転送方式のいずれかに従って、前記第1記憶部から転送される前記通信データを格納する第2記憶部と、
      前記第2記憶部に格納された前記通信データを用いて、演算処理を実行する演算処理部と、
      前記演算処理部と前記通信回路とに接続されたDMAコントローラとを備え、
     前記複数の転送方式は、前記演算処理部が前記通信データを転送する第1転送方式と、前記DMAコントローラが前記通信データを転送する第2転送方式とを含み、
     前記演算処理部は、ユーザからの指示に従って、または、予め定められた条件に従って、前記第1転送方式と前記第2転送方式とのうち、いずれかの転送方式を選択する、制御システム。
  2.  前記演算処理部は、
      前記第1転送方式により前記通信データが前記第2記憶部に転送される時間と、該転送される時間および前記演算処理が実行される時間とのうちのいずれかの第1転送時間と、前記第2転送方式により前記通信データが前記第2記憶部に転送される時間と、該転送される時間および前記演算処理が実行される時間とのうちのいずかの第2転送時間とを計測し、
      前記第1転送時間と前記第2転送時間とを含む計測データを出力する、請求項1に記載の制御システム。
  3.  前記演算処理部は、前記制御装置への電力の供給が開始された場合、または、前記制御装置に接続された前記1または複数の機能ユニットの構成が変更された場合に、前記第1転送時間と前記第2転送時間とを計測する、請求項2に記載の制御システム。
  4.  前記計測データは、前記第1転送方式による前記通信データの転送が、複数回実行されたときの前記第1転送時間における平均第1転送時間と、前記第2転送方式による前記通信データの転送が、複数回実行されたときの前記第2転送時間における平均第2転送時間とを含み、
     前記演算処理部は、前記平均第1転送時間で転送が実行される前記第1転送方式と、前記平均第2転送時間で転送が実行される前記第2転送方式とのうち、短い時間で転送が実行される転送方式を選択可能する、請求項2または3に記載の制御システム。
  5.  前記計測データは、前記第1転送方式による前記通信データにおける転送が、複数回実行されたときの前記第1転送時間におけるばらつき度合いと、前記第2転送方式による前記通信データにおける転送が、複数回実行されたときの前記第2転送時間におけるばらつき度合いとを含み、
     前記演算処理部は、前記第1転送時間におけるばらつき度合いで転送が実行される第1転送方式と、前記第2転送時間におけるばらつき度合いで転送が実行される第2転送方式のうち、小さいばらつきの度合いで転送が実行される転送方式を選択可能とする、請求項2または3に記載の制御システム。
  6.  前記計測データを受け付けるサポート装置をさらに備え、
     前記サポート装置は、受け付けた前記計測データに基づいて、前記通信データの転送において許容される最大の時間と、前記第1転送方式および前記第2転送方式のうち、いずれかの転送方式により前記通信データが転送されたときに実測された時間とを比較可能な画像を表示する表示部を含む、請求項2~5のいずれか1項に記載の制御システム。
  7.  1または複数の機能ユニット間で巡回的に伝送される通信データを遣り取りする制御装置であって、
     前記通信データを一時的に格納する第1記憶部を有する通信回路と、
     複数の転送方式のいずれかに従って、前記第1記憶部から転送される前記通信データを格納する第2記憶部と、
     前記第2記憶部に格納された前記通信データを用いて、演算処理を実行する演算処理部と、
     前記演算処理部と前記通信回路とに接続されたDMAコントローラとを備え、
     前記複数の転送方式は、前記演算処理部が前記通信データを転送する第1転送方式と、前記DMAコントローラが前記通信データを転送する第2転送方式とを含み、
     前記演算処理部は、ユーザからの指示に従って、または、予め定められた条件に従って、前記第1転送方式と前記第2転送方式とのうち、いずれかの転送方式を選択する、制御装置。
PCT/JP2019/041736 2018-11-19 2019-10-24 制御システムおよび制御装置 WO2020105358A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/286,487 US20210389741A1 (en) 2018-11-19 2019-10-24 Control system and control device
CN201980057878.XA CN112673362A (zh) 2018-11-19 2019-10-24 控制系统以及控制装置
EP19886224.5A EP3885922A4 (en) 2018-11-19 2019-10-24 CONTROL SYSTEM AND CONTROL DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-216587 2018-11-19
JP2018216587A JP7192427B2 (ja) 2018-11-19 2018-11-19 制御システムおよび制御装置

Publications (1)

Publication Number Publication Date
WO2020105358A1 true WO2020105358A1 (ja) 2020-05-28

Family

ID=70774109

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/041736 WO2020105358A1 (ja) 2018-11-19 2019-10-24 制御システムおよび制御装置

Country Status (5)

Country Link
US (1) US20210389741A1 (ja)
EP (1) EP3885922A4 (ja)
JP (1) JP7192427B2 (ja)
CN (1) CN112673362A (ja)
WO (1) WO2020105358A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11025544B2 (en) * 2019-06-07 2021-06-01 Intel Corporation Network interface for data transport in heterogeneous computing environments

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0512181A (ja) * 1991-07-01 1993-01-22 Nec Eng Ltd 電子計算機
JPH11353269A (ja) * 1998-06-04 1999-12-24 Matsushita Electric Ind Co Ltd データ転送判別装置及びデータ転送判別方法
JP2016194823A (ja) * 2015-03-31 2016-11-17 オムロン株式会社 制御装置
JP2018129614A (ja) 2017-02-07 2018-08-16 オムロン株式会社 制御装置および通信装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7072996B2 (en) * 2001-06-13 2006-07-04 Corrent Corporation System and method of transferring data between a processing engine and a plurality of bus types using an arbiter
US7689732B2 (en) * 2006-02-24 2010-03-30 Via Technologies, Inc. Method for improving flexibility of arbitration of direct memory access (DMA) engines requesting access to shared DMA channels
JP2010282352A (ja) * 2009-06-03 2010-12-16 Renesas Electronics Corp Dma転送制御装置
JP4894961B1 (ja) * 2011-03-15 2012-03-14 オムロン株式会社 Plcのcpuユニット、plc用システムプログラムおよびplc用システムプログラムを格納した記録媒体

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0512181A (ja) * 1991-07-01 1993-01-22 Nec Eng Ltd 電子計算機
JPH11353269A (ja) * 1998-06-04 1999-12-24 Matsushita Electric Ind Co Ltd データ転送判別装置及びデータ転送判別方法
JP2016194823A (ja) * 2015-03-31 2016-11-17 オムロン株式会社 制御装置
JP2018129614A (ja) 2017-02-07 2018-08-16 オムロン株式会社 制御装置および通信装置

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
JP2020088479A (ja) 2020-06-04
EP3885922A4 (en) 2022-08-17
US20210389741A1 (en) 2021-12-16
JP7192427B2 (ja) 2022-12-20
CN112673362A (zh) 2021-04-16
EP3885922A1 (en) 2021-09-29

Similar Documents

Publication Publication Date Title
US10761515B2 (en) Control system for controlling control object and control device for linking control applications in control system
JP4905597B1 (ja) コントローラサポート装置、その装置において実行されるためのコントローラサポートプログラム、およびそのプログラムを格納する記録媒体
JP6406466B1 (ja) 制御装置、制御方法および制御プログラム
US11301294B2 (en) Control device, control method, and control program
JP2018173883A (ja) 制御装置、制御プログラム、制御システム、および制御方法
EP2533114A1 (en) Controller support device, controller support program to be executed in said device, recording medium storing said program, and method for estimating execution duration of control program
JP2019049947A (ja) 制御装置および制御方法
US11231700B2 (en) Communication system, communication method, and information storage medium
WO2020105358A1 (ja) 制御システムおよび制御装置
JP7067406B2 (ja) 制御システム、制御装置および制御方法
JP6502908B2 (ja) スレーブ機器
JP6772748B2 (ja) 演算装置および制御システム
JP7003952B2 (ja) 制御システム、サポート装置およびサポート装置用のプログラム
US11269313B2 (en) Controller and control system that stores data in current control cycle for output in next control cycle
WO2019176287A1 (ja) 制御装置、制御システム、制御方法、および、制御プログラム
WO2021084771A1 (ja) 制御システム、制御システムの通信制御方法、および制御装置
JP2019215818A (ja) 制御装置およびその制御方法
US20180101393A1 (en) Arithmetic operation device and control apparatus
JP7110911B2 (ja) コントローラおよびコントローラの備える通信制御部の制御方法
JP2018129614A (ja) 制御装置および通信装置
JP2022118822A (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: 19886224

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019886224

Country of ref document: EP

Effective date: 20210621