WO2021220516A1 - プログラム実行装置、プログラム実行方法及びコンピュータプログラム - Google Patents

プログラム実行装置、プログラム実行方法及びコンピュータプログラム Download PDF

Info

Publication number
WO2021220516A1
WO2021220516A1 PCT/JP2020/018467 JP2020018467W WO2021220516A1 WO 2021220516 A1 WO2021220516 A1 WO 2021220516A1 JP 2020018467 W JP2020018467 W JP 2020018467W WO 2021220516 A1 WO2021220516 A1 WO 2021220516A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
data
operation mode
instruction
cache
Prior art date
Application number
PCT/JP2020/018467
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 PCT/JP2020/018467 priority Critical patent/WO2021220516A1/ja
Priority to JP2020561840A priority patent/JP6929474B1/ja
Publication of WO2021220516A1 publication Critical patent/WO2021220516A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0862Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with prefetch

Definitions

  • This disclosure relates to a program execution device, a program execution method, and a computer program.
  • a PLC Programmable Logic Controller
  • a cache is a storage device capable of reading and writing data at a higher speed than other memories. Therefore, when the data required for the arithmetic processing is read from the cache, the arithmetic processing can be executed at a higher speed than when the data is read from a memory typified by RAM (Random Access Memory). .. Similarly, when data is written to the cache, it becomes possible to execute arithmetic processing at high speed.
  • Patent Document 1 when a program created by a user is compiled into an instruction code, the frequency of use of the device included in the instruction code is classified, and device data representing the state of the frequently used device is processed at high speed.
  • a programmable controller is described in which the device data representing the state of an infrequently used device is stored in the data memory by storing the device data in the built-in memory of the processor capable of the device. According to this programmable controller, it is possible to speed up the arithmetic processing.
  • one of a plurality of different processes realized by one program may be performed. For example, when the user presses a switch, the operation mode defined by the program may be changed to switch the process to be performed. In such a case, the entire program does not function, and a part of the program functions according to the state of the switch.
  • the purpose of the present disclosure is to switch the operation mode to be executed according to the line process and execute a program capable of executing a plurality of different processes at a higher speed.
  • the program execution device of the present disclosure is a program execution device that executes a program having a plurality of operation modes for carrying out different steps in a line, and the program is provided for each of the plurality of operation modes.
  • a counting means that counts the frequency of access to the storage device that occurs during execution for each data that is the target of the access, designation of the operation mode of the program, and execution of the program in the specified operation mode.
  • the storage means that stores the data in the cache in the order of the frequency of counting by the counting means in the designated operation mode received by the reception means, and the reception means. It includes an execution means for executing a program in a specified operation mode by referring to the data stored in the cache by the storage means.
  • the counting means counts the frequency of access to the storage device that occurs when the program is being executed for each data in each operation mode. Then, the storage means stores the data to be accessed in the cache in descending order of frequency of access in the specified operation mode.
  • the execution means is more likely to refer to the data stored in the cache when the program is executed. Therefore, the program is executed in a state where the cache state is optimized according to the operation mode. Therefore, it is possible to execute a program capable of executing a plurality of different processes at a higher speed by switching the operation mode to be executed according to the line process.
  • Flow chart showing the operation process according to the first embodiment A flowchart showing a test run process according to the first embodiment.
  • the figure which shows an example of the information stored in the firmware frequency storage part which concerns on Embodiment 1. A flowchart showing a normal operation process according to the first embodiment.
  • FIG. 1 shows the configuration of the control system 1000 including the program execution device 100 according to the present embodiment.
  • the control system 1000 is a system formed in a factory, and is an FA system for processing and inspecting a workpiece according to a preset production line to produce a product.
  • the control system 1000 includes a program execution device 100 that controls the devices 30 and 31 to operate the production line by executing the ladder program P1, a terminal 20 for setting the control contents by the program execution device 100, and the production line. It has devices 30 and 31 installed in.
  • the ladder program P1 having a plurality of operation modes is provided from the terminal 20 to the program execution device 100, and is efficiently executed by the program execution device 100 in a state where the cache is optimized for each operation mode. ..
  • the program execution device 100 and the terminal 20 are connected by a communication line typified by a USB (Universal Serial Bus) cable and a LAN cable, and communicate with each other by transmitting and receiving signals. Further, the program execution device 100 and the devices 30 and 31 are connected to each other via an FA network or an industrial network, and communicate with each other by transmitting and receiving signals.
  • the form of communication by the program execution device 100, the terminal 20, and the devices 30 and 31 is not limited to this, and may be arbitrarily changed.
  • the device 30 has, for example, a sensor that measures pressure or temperature, and is a sensor device that periodically notifies the program execution device 100 of a signal indicating a measurement result by this sensor.
  • the cycle in which the measurement result is notified is, for example, a 1-second interval or a 1-minute interval.
  • the measurement result notified from the device 30 is used by the program execution device 100 to determine the control content.
  • the device 31 is, for example, an actuator or a robot, and operates in accordance with a command from the program execution device 100 based on the measurement result of the device 30. According to the devices 30 and 31, the program execution device 100 can process the work according to the result of the measurement on the production line.
  • the program execution device 100 sprays the paint onto the device 31 which is a painting robot.
  • the device 31 which is a painting robot.
  • the control system 1000 may form the devices 30 and 31.
  • the devices 30 and 31 may be other devices different from the sensors, actuators and robots.
  • the terminal 20 is a GUI (Graphical User Interface) terminal used as a user interface of an IPC (Industrial Personal Computer) or a program execution device 100.
  • the terminal 20 compiles the ladder program P1 created by the user 21 operating the terminal 20, and transmits the object-format ladder program P1 to the program execution device 100 according to the instruction of the user 21.
  • the ladder program P1 is a program written in the ladder language, and is created in order to realize the line process requested by the user 21.
  • the ladder program P1 has a plurality of operation modes for carrying out different steps on the production line, and is executed in any one of the plurality of operation modes designated by the user 21.
  • FIG. 2 shows an example of three operation modes included in the ladder program P1 and steps executed in each mode.
  • the ladder program P1 when the ladder program P1 is executed in the first mode M1, the step of "white coating” is performed on the production line, and when it is executed in the second mode M2, "black coating” is performed on the production line.
  • the step of is carried out and executed in the third mode M3, the step of "no coating” is carried out on the production line. According to such a ladder program P1, it is possible to switch the type of the manufacturing process.
  • the program execution device 100 is a control device typified by a PLC.
  • FIG. 3 schematically shows the hardware configuration of the program execution device 100.
  • the program execution device 100 includes a processor 11, a main storage unit 12, an auxiliary storage unit 13, an input unit 14, an output unit 15, and a communication unit 16.
  • the main storage unit 12, the auxiliary storage unit 13, the input unit 14, the output unit 15, and the communication unit 16 are all connected to the processor 11 via the internal bus 17.
  • the processor 11 is an MPU (Micro Processing Unit) or a CPU (Central Processing Unit) including a cache memory 101 as a cache.
  • the process executed by the processor 11 according to the program P2 includes a process of controlling the devices 30 and 31 by executing the ladder program P1 stored in the auxiliary storage unit 13.
  • the ladder program P1 corresponds to an example of an execution program having a plurality of operation modes
  • the program P2 corresponds to an example of a computer program for causing the program execution device 100 to exert a function as a computer.
  • the cache memory 101 is a built-in memory of the processor 11.
  • the processor 11 writes and reads the data stored in the cache memory 101 at a higher speed than the data stored in the main storage unit 12 and the auxiliary storage unit 13. Partial data A11 corresponding to a part of process data A10, which will be described later, is loaded into the cache memory 101.
  • the cache memory 101 is used as a work area of the processor 11 that executes the ladder program P1.
  • the main storage unit 12 includes a RAM (RandomAccessMemory) having a capacity larger than that of the cache memory 101.
  • the program P2 is loaded into the main storage unit 12 from the auxiliary storage unit 13.
  • the main storage unit 12 is used as a work area of the processor 11 that executes the program P2.
  • partial data A12 corresponding to a part of process data A10 is loaded into the main storage unit 12, and the main storage unit 12 is used as a work area of the processor 11 that executes the ladder program P1.
  • the partial data A11 and A12 are different data that are divided from the process data A10 and assigned to the cache memory 101 and the main storage unit 12, respectively.
  • the partial data A11 and A12 are, for example, one or more data of an instruction code which is a part of the ladder program P1, device data used when executing the ladder program P1, and a firmware module. be.
  • the processor 11 executes the ladder program P1
  • the partial data A11 and A12 are referred to and used.
  • the number of accesses from the processor 11 to the partial data A11 is larger than the number of accesses to the partial data A12, the number of delays when the processor 11 accesses the main storage unit 12 decreases, and the arithmetic processing is performed. Become faster.
  • the partial data A11 and A12 may be data having some information in duplicate, or the partial data A12 may include the partial data A11.
  • the auxiliary storage unit 13 includes a non-volatile memory represented by an EEPROM (Electrically Erasable Programmable Read-Only Memory).
  • the auxiliary storage unit 13 stores the program P2 and the process data A10 for executing the process on the production line.
  • the auxiliary storage unit 13 supplies the data used by the processor 11 to the processor 11 according to the instruction of the processor 11, and stores the data supplied from the processor 11.
  • the process data A10 includes a ladder program P1 and firmware P3 used when the ladder program P1 is executed. While the ladder program P1 is designed to realize the line process requested by the user, the firmware P3 is software stored in advance in the auxiliary storage unit 13 regardless of the design of the line process.
  • the firmware P3 functions as, for example, an FTP (File Transfer Protocol) server or a web server for providing the user with real-time information about the production line.
  • FTP File Transfer Protocol
  • the input unit 14 includes an input device represented by a slide switch and a push button operated by the user.
  • the input unit 14 acquires the information input by the user 21 to the program execution device 100, and notifies the processor 11 of the acquired information.
  • the output unit 15 includes an output device typified by an LED (Light Emitting Diode), an LCD (Liquid Crystal Display), and a buzzer.
  • the output unit 15 presents various information to the user according to the instruction of the processor 11.
  • the communication unit 16 includes a communication interface circuit for communicating with an external device.
  • the communication unit 16 receives a signal from the outside and outputs the data indicated by this signal to the processor 11. Further, the communication unit 16 transmits a signal indicating the data output from the processor 11 to an external device.
  • the program execution device 100 may have a plurality of communication units 16.
  • the program execution device 100 may separately have a first communication unit 16 for communicating with the terminal 20 and a second communication unit 16 for communicating with the devices 30 and 31.
  • the program execution device 100 exhibits various functions as shown in FIG. 4 by cooperating with the above-mentioned hardware configurations.
  • FIG. 4 also shows the functions of the programming tool 200 realized by the terminal 20.
  • the programming tool 200 is realized by the terminal 20 executing a specific program as a tool for the user 21 to program in the ladder language.
  • the programming tool 200 includes a program creation unit 210 for the user 21 to operate the GUI to create a ladder program P1, and a compiler 220 for acquiring and compiling the ladder program P1 written in the ladder language from the program creation unit 210.
  • the user 21 has a setting unit 230 for setting various parameters with respect to the ladder program P1.
  • the setting unit 230 has an operation mode setting unit 231 for the user 21 to set a correspondence relationship between the operation mode of the ladder program P1 and the input state for the program execution device 100.
  • FIG. 5 shows an example of the ladder program P1.
  • This ladder program P1 includes contacts C11, C12, C13, C14, C15 that are turned on when the first mode M1 is executed, contacts C21, C22, C23 that are turned on when the second mode M2 is executed, and a third. It has contacts C31, C32, and C33 that are turned on when the mode M3 is executed. All the contacts that are turned on in each mode are turned off when the other modes are executed. For example, when the first mode M1 is executed, the contacts C21 to C23 and C31 to C33 are all turned off.
  • the instruction "instruction code i11 DD11 DD12" described to be connected to the contact C11 is executed, but if the contact C11 is in the OFF state, this instruction is not executed.
  • the instruction "instruction code i12 DD13 DD14” is executed, and if the contact C13 is in the ON state, the instruction “instruction code i13 DD15 DD16” is executed, and the contact C14 is in the ON state. If so, the instruction “instruction code i14 DD17” is executed, and if the contact C15 is in the ON state, the instruction “instruction code i15" is executed.
  • the ladder program P1 itself does not include information regarding the operation mode.
  • the correspondence between the input state of the program execution device 100 and the contact that should be turned ON in the operation mode corresponding to this input state is set by the user.
  • FIG. 6 illustrates operation mode setting information set by the user.
  • This operation mode setting information is table format data that associates the operation mode, the input state corresponding to this operation mode, and the contact state in this operation mode.
  • the example of FIG. 6 shows that the contact state can be switched as shown in FIG. 5 with the position of the slide switch which is the input unit 14 of the program execution device 100 as the input state.
  • the program execution device 100 tries to execute the ladder program P1 in advance in each operation mode, and after that, the ladder program is optimized after optimizing the data allocation in the operation mode specified by the user 21. It has a function to execute P1. Specifically, the program execution device 100 receives the provision of the ladder program P1 and the operation mode setting information from the programming tool 200 as its function, and specifies the operation mode and gives an execution instruction when the ladder program P1 is executed by the user.
  • the reception unit 110 that receives from 21 and the execution unit 120 that executes the ladder program P1 and the counting unit 130 that counts the access frequency to the storage device at the time of execution and the counting unit 130 count each of the operation modes of the ladder program P1.
  • Data frequency storage unit 141, instruction frequency storage unit 142, and firmware frequency storage unit 143 that store information indicating the frequency of the data are allocated and stored in different storage areas based on the counted frequency and the specified operation mode. Access to the storage unit 150, the data cache memory 161 and the instruction cache memory 162 and the firmware cache memory 163 that can be accessed at a relatively high speed, and the data cache memory 161 and the instruction cache memory 162 and the firmware cache memory 163, respectively. It has a time-consuming data external memory 171, an instruction external memory 172, and a firmware external memory 173.
  • the data frequency storage unit 141, the instruction frequency storage unit 142, and the firmware frequency storage unit 143 will be collectively referred to as the frequency storage unit 140 as appropriate.
  • the data cache memory 161 and the instruction cache memory 162 and the firmware cache memory 163 are collectively referred to as a cache memory 160 as appropriate.
  • the data external memory 171 and the instruction external memory 172 and the firmware external memory 173 are collectively referred to as an external memory 170 as appropriate.
  • the reception unit 110 is realized mainly by the cooperation of the processor 11, the input unit 14, and the communication unit 16.
  • the reception unit 110 receives the provision of the object-format ladder program P1 generated by the compiler 220 and the parameters set by the setting unit 230 from the programming tool 200.
  • the parameters provided by the programming tool 200 include the operation mode setting information illustrated in FIG. Then, the reception unit 110 sends the provided ladder program P1 and the parameters to the execution unit 120.
  • the reception unit 110 specifies an operation mode indicated by the input state of the switch operated by the user 21, an optimization instruction for each operation mode, and an execution instruction of the ladder program P1 indicated by pressing the push button.
  • the optimization instruction is an instruction to execute cache optimization for each operation mode. For example, if the cache is optimized when the first mode M1 is executed but the cache is not optimized when the second mode M2 is executed, an optimization instruction for the first mode M1 is input. In the following, an example in which optimization instructions are input for all operation modes will be mainly described.
  • the reception unit 110 notifies the execution unit 120 of the received designated operation mode and execution instruction.
  • the reception unit 110 corresponds to an example of a reception means for executing a reception step for receiving a designation of a program operation mode and an instruction to execute a program in the designated operation mode in the program execution device 100.
  • the execution unit 120 is mainly realized by the processor 11.
  • the execution unit 120 preliminarily executes the ladder program P1 in each operation mode in order to count the frequency of data usage in each operation mode.
  • the execution unit 120 executes the instruction specified in the ladder program P1 after turning on the contacts corresponding to each operation mode indicated by the operation mode setting information.
  • the program execution device 100 will execute a test run in each operation mode.
  • the execution unit 120 instructs the counting unit 130 to count each data of the access frequency to the storage device generated when the ladder program P1 is executed in each operation mode.
  • the storage device used at the time of the trial run may be only the main storage unit 12, or may be the cache memory 101 and the main storage unit 12 to which data is allocated in a non-optimized state. good.
  • the execution unit 120 when the execution unit 120 is notified of the operation mode designation and the execution instruction of the ladder program P1 from the reception unit 110 together with the optimization instruction, the execution unit 120 outputs data to the cache memory 160 and the external based on the counting result of the access frequency in the designated mode.
  • the storage unit 150 is instructed to allocate and store the memory 170.
  • the designated mode means an operation mode designated by the switch operation of the user 21.
  • the execution unit 120 executes the ladder program P1 in the designated mode. Specifically, the execution unit 120 determines the designated mode corresponding to the current input state in the operation mode setting information, turns on the contact corresponding to this designated mode, and then issues the instruction specified in the ladder program P1. Run.
  • the program execution device 100 executes normal operation by using the cache memory 160 optimized according to the designated mode.
  • the execution unit 120 refers to the data stored in the cache by the storage means and executes an execution step of executing the program in a designated operation mode. Corresponds to an example of the execution means to be performed.
  • the counting unit 130 is mainly realized by the processor 11.
  • the counting unit 130 counts the access frequency to the storage device when each operation mode is executed according to the instruction from the execution unit 120 for each data to be accessed. Access to the storage device usually corresponds to both reading and writing of data, but the counting unit 130 may count the access frequency of only one of reading and writing. That is, when the ladder program P1 is executed in one operation mode, the counting unit 130 counts the number of times the storage device is accessed for reading and writing data for each data, thereby accessing each data. Count the frequency. The counting unit 130 executes this counting for the operation mode in which the optimization instruction is received. Then, the counting unit 130 stores the counting result in the frequency storage unit 140.
  • the counting unit 130 counts the frequency of access to the storage device that occurs when the program is being executed by the execution means for each of the data to be accessed in each of the plurality of operation modes. It corresponds to an example of a counting means that executes a counting step.
  • the data frequency storage unit 141, the instruction frequency storage unit 142, and the firmware frequency storage unit 143 are each realized mainly by the auxiliary storage unit 13.
  • the access to the storage device generated by the execution of the ladder program P1 will be described with reference to FIG. 7.
  • a part of the ladder program P1 illustrated in FIG. 5 is shown in the upper part of FIG. 7.
  • the instruction "instruction code i11 DD11 DD12" executed when the contact C11 is in the ON state includes the instruction code "instruction code i11" and the device data "DD11" which is a numerical value or a character string. And "DD12".
  • the device data is shown, for example, by a sensor detection result, parameters set in the devices 30 and 31, other numerical values or character strings representing the operating states of the devices 30 and 31 in real time, or by variables or fixed values.
  • the instruction code is an operation instruction included in the instruction set of the processor 11, and is, for example, an addition instruction, a transfer instruction, or a conditional branch instruction for device data.
  • the firmware module constituting the firmware is referred to. For example, when an instruction code for notifying the web server of the detection result of the device 30 is executed, the firmware module for realizing the web server is appropriately referred to.
  • the device data, the instruction code, and the firmware module constitute the process data A10 shown in FIG. Then, it is loaded into the cache memory 101 and the main storage unit 12 and appropriately used by the processor 11.
  • the firmware module corresponds to the firmware P3 in FIG.
  • the device data, the instruction code, and the firmware module are examples of data to be accessed for counting the frequency of access to the storage device.
  • the data frequency storage unit 141 stores the counting result obtained by counting the frequency of access to the device data by the counting unit 130 as the access to the storage device.
  • the instruction frequency storage unit 142 stores a counting result obtained by counting the frequency of access to the instruction code by the counting unit 130 as an access to the storage device.
  • the firmware frequency storage unit 143 stores a counting result obtained by counting the frequency of access to the firmware module by the counting unit 130 as an access to the storage device.
  • the storage unit 150 is mainly realized by the processor 11.
  • the storage unit 150 reads from the frequency storage unit 140 the frequency of access to the storage device for each data counted in the designated mode according to the instruction from the execution unit 120. Then, the storage unit 150 stores the data to be accessed in the cache memory 160 in the order of frequency in the designated mode, and stores other data not stored in the cache memory 160 in the external memory 170. Optimizes the placement of data.
  • the storage unit 150 stores a predetermined number of device data in the data cache memory 161 in order from the one with the highest access frequency in the designated mode, based on the counting result stored in the data frequency storage unit 141. , Other device data that was not stored in the data cache memory 161 is stored in the data external memory 171. Similarly, the storage unit 150 stores a predetermined number of instruction codes in the instruction cache memory 162 in order from the one with the highest access frequency in the designated mode based on the counting result stored in the instruction frequency storage unit 142. Other instruction codes that are not stored in the instruction cache memory 162 are stored in the instruction external memory 172.
  • the storage unit 150 stores a predetermined number of firmware modules in the firmware cache memory 163 in order from the one with the highest access frequency in the designated mode based on the counting result stored in the firmware frequency storage unit 143, and the firmware. Other firmware modules that are not stored in the cache memory 163 are stored in the firmware external memory 173.
  • the number of data stored in each cache memory 160 is predetermined according to the capacity of each cache memory 160.
  • the storage unit 150 writes the maximum number of data that can be written to each cache memory 160 in order from the most frequent data to the cache memory 160.
  • the storage unit 150 corresponds to an example of a storage means that executes a storage step of storing data in a cache in descending order of frequency counted by the counting means in a designated operation mode accepted by the receiving means in the program execution device 100. do.
  • the data cache memory 161 and the instruction cache memory 162 and the firmware cache memory 163 are each realized mainly by the cache memory 101.
  • Device data is stored in the data cache memory 161 by the storage unit 150 in descending order of access frequency according to the designated mode.
  • the instruction cache memory 162 stores instruction codes in descending order of access frequency according to the designated mode
  • the firmware cache memory 163 stores firmware modules in descending order of access frequency according to the designated mode.
  • the data stored in these cache memories 160 are referred to and used by the execution unit 120 when the ladder program P1 is executed in the designated mode.
  • the data external memory 171 and the instruction external memory 172 and the firmware external memory 173 are mainly realized by the main storage unit 12.
  • device data having a relatively low access frequency in the designated mode is stored by the storage unit 150.
  • the instruction external memory 172 stores an instruction code having a relatively low access frequency in the designated mode
  • the firmware external memory 173 stores a firmware module having a relatively low access frequency in the designated mode.
  • the data stored in these external memories 170 is referred to and used by the execution unit 120 when the ladder program P1 is executed in the designated mode.
  • FIG. 8 shows a flow of operation processing executed when the power is turned on to the program execution device 100.
  • the flow of this operation process is an example indicating the order in which the functions of the program execution device 100 are exhibited, and may be arbitrarily changed.
  • the program execution device 100 receives the ladder program P1 and the parameters created by the user 21 from the programming tool 200 (step S1). Specifically, the reception unit 110 receives the information indicating the parameters including the ladder program P1 and the operation mode setting information transmitted from the programming tool 200.
  • the program execution device 100 executes a test run process for counting the access frequency (step S2).
  • FIG. 9 shows the details of this test run process.
  • the reception unit 110 determines whether or not the test run execution instruction has been received from the programming tool 200 (step S20).
  • the test run execution instruction is input, for example, by the user 21 clicking the button "start test run” or "execute optimization" in the GUI of the programming tool 200.
  • the optimization may be executed for all the specified modes, or the user may select the operation mode to be optimized.
  • the reception unit 110 repeats the determination in step S20 and waits until the test run execution instruction is received. On the other hand, when it is determined that the test run execution instruction has been received (step S20; Yes), the reception unit 110 receives the number of trial cycles for each operation mode (step S21).
  • the program execution device 100 which is a PLC, normally repeatedly executes the process defined by the ladder program P1.
  • the ladder program includes a conditional branch, there may be a partial program that is not executed only by executing the ladder program P1 once, and there is a possibility that a count result sufficient for optimization cannot be obtained. Therefore, in the test run process, the ladder program P1 is repeatedly executed as many times as the user requests.
  • the reception unit 110 receives the number of trial cycles as this number for each operation mode.
  • the reception unit 110 may receive the number of trial cycles before the test run execution instruction, or may receive the trial run at the same time as the test run execution instruction.
  • the execution unit 120 selects one unselected operation mode from the plurality of operation modes defined by the operation mode setting information (step S22).
  • the order in which the operation modes are selected is arbitrary. For example, when the step S22 is executed for the first time, the execution unit 120 selects the first mode M1 specified first in the operation mode setting information, and when the step S22 is executed again, the operation mode setting information. Select one operation mode according to the order specified by.
  • the execution unit 120 substitutes 1 as the initial value for the number of cycles C (step S23).
  • the number of cycles C is a variable indicating the number of cycles of the running ladder program P1.
  • the execution unit 120 executes the ladder program P1 for only one cycle in the operation mode selected in step S22 (step S24). For example, when the first mode M1 is selected in step S22, the execution unit 120 executes the five instruction codes shown in the upper part of FIG. 5 once in order.
  • the counting unit 130 monitors the execution of the ladder program P1 in step S24, and counts the access frequency to each of the device data, the instruction code, and the firmware as the access frequency to the storage device (step S25). Specifically, the counting unit 130 includes the instruction code and device data included in the instruction and the firmware when the firmware module is executed by the instruction each time the instructions included in the ladder program P1 are executed in order. The module is specified, and 1 is added to the access frequency stored in the frequency storage unit 140 for the specified instruction code, device data, and firmware module.
  • the counting unit 130 uses the instruction code “instruction code i11 DD11 DD12" and the device data "DD11". , The access frequency of each of the device data "DD12" and “firmware module 1” is counted up. After that, when an instruction including the same instruction code "instruction code i11" is executed again, the access frequency of the instruction code is further counted up. If the execution of the instruction does not involve the execution of the firmware module, the counting unit 130 does not change the access frequency of the firmware module.
  • step S25 the execution unit 120 determines whether or not the number of cycles C is equal to the number of trial cycles corresponding to the operation mode selected in step S22 among the number of trial cycles received in step S21 (step S26). As a result, it is determined whether or not the test run in the selected operation mode should be completed.
  • step S26 When it is determined that the number of cycles C is not equal to the number of trial cycles (step S26; No), the execution unit 120 adds 1 to the number of cycles C (step S27), and repeats the processes after step S24. As a result, the ladder program P1 is executed as many times as the number of trial cycles.
  • step S26 when it is determined that the number of cycles C is equal to the number of trial cycles (step S26; Yes), the execution unit 120 determines whether or not all the operation modes that have received the optimization instruction have been selected (step S28). Specifically, the execution unit 120 determines whether or not any of the plurality of operation modes defined by the operation mode setting information has been selected in step S22.
  • step S28; No When it is determined that all the operation modes that have received the optimization instruction have not been selected (step S28; No), the execution unit 120 repeats the processes after step S22. As a result, a test run is executed for the unselected operation mode and the access frequency is counted. On the other hand, when it is determined that all the operation modes that have received the optimization instruction have been selected (step S28; Yes), the test run process ends.
  • FIG. 10 illustrates the number of accesses for each device data stored as the frequency of access to the storage device in the data frequency storage unit 141 when the test run process is completed.
  • the access frequency of the device data “DD11” and “DD12” is higher than that of other device data in the first mode M1.
  • FIG. 11 illustrates the number of accesses for each instruction code stored in the instruction frequency storage unit 142 as the frequency of access to the storage device
  • FIG. 12 shows the number of accesses to the storage device in the firmware frequency storage unit 143. The number of accesses for each firmware module stored as the frequency of access is illustrated.
  • step S3 the normal operation process for actually operating the line process requested by the user 21 is executed (step S3).
  • FIG. 13 shows the details of this normal operation process.
  • the reception unit 110 determines whether or not the designated mode and the execution instruction have been received (step S30). Specifically, the reception unit 110 accepts the designated mode by specifying the operation mode corresponding to the input state of the switch operated by the user 21 from the operation mode setting information, and pushes to execute the ladder program P1. It is determined whether or not the execution instruction by pressing the button has been accepted.
  • step S30 When it is determined that the designated mode and the execution instruction are not accepted (step S30; No), the reception unit 110 repeats the determination in step S30 and waits until the designated mode and the execution instruction are accepted.
  • the storage unit 150 refers to the access frequency corresponding to the designated mode in the data frequency storage unit 141, and the access frequency is another device.
  • a number of device data higher than the data that can be allocated to the data cache memory 161 or a number specified by the user 21 is allocated and stored (step S31). For example, when the designated mode is the first mode M1 and the number of data that can be allocated to the data cache memory 161 is two, the access to the storage device is based on the data frequency storage unit 141 shown in FIG.
  • the device data "DD11" and "DD12" are assigned to the data cache memory 161 in descending order of frequency, and the other device data "DD13" to "DD16" are assigned to the data external memory 171.
  • the storage unit 150 refers to the access frequency corresponding to the designated mode in the instruction frequency storage unit 142, and can allocate an instruction code having a higher access frequency than the other instruction codes to the instruction cache memory 162, or A number specified by the user 21 is allocated and stored (step S32). For example, when the designated mode is the first mode M1 and the number of data that can be allocated to the instruction cache memory 162 is one, access to the storage device is performed based on the instruction frequency storage unit 142 shown in FIG.
  • the instruction code "instruction code i11" is assigned to the instruction cache memory 162 in descending order of frequency, and the other instruction codes "instruction code i12" and “instruction code i13" are assigned to the instruction external memory 172.
  • the storage unit 150 refers to the access frequency corresponding to the designated mode in the firmware frequency storage unit 143, and can allocate a firmware module having a higher access frequency than the other firmware modules to the firmware cache memory 163, or ,
  • the number specified by the user 21 is allocated and stored (step S33). For example, when the designated mode is the first mode M1 and the number of data that can be allocated to the firmware cache memory 163 is one, the access to the storage device is performed based on the firmware frequency storage unit 143 shown in FIG.
  • the "firmware module 1" is assigned to the firmware cache memory 163 in descending order of frequency, and the other "firmware module 2" is assigned to the firmware external memory 173.
  • the execution unit 120 executes the ladder program P1.
  • the ladder program P1 is executed with the frequently accessed data stored in the cache memory 160 in the designated mode.
  • the execution unit 120 executes the ladder program P1 without changing the data allocation to the cache until the normal operation process is completed, but if necessary during the execution of the normal operation process. You may change the allocation of data to the cache. After that, the normal operation process ends.
  • step S3 is executed again following the normal operation process of step S3.
  • the normal operation process in a state optimized for the designated mode requested by the user 21 is executed again.
  • the execution unit 120 executes the ladder program P1 in each of the plurality of operation modes, and the counting unit 130 generates the ladder program P1 in each of the operation modes.
  • the frequency of access to the storage device is counted for each data.
  • the storage unit 150 stores the data in the cache in descending order of access frequency in the designated mode.
  • the execution unit 120 is more likely to refer to the data stored in the cache when executing the ladder program P1 in the designated mode. Therefore, the ladder program P1 is executed in a state where the cache is optimized according to the designated mode. For example, in the example shown in FIG.
  • the device data "DD13" to "DD16” that are relatively infrequently accessed and the device data "DD21" and “DD22" that are not accessed are cached.
  • the ladder program P1 can be executed without causing a delay due to the allocation to 160. That is, the portion of the ladder program P1 that is not executed in the specified mode is not allocated to the cache. Therefore, it is possible to execute the ladder program P1 for executing a plurality of different processes at a higher speed by switching the operation mode to be executed according to the line process.
  • the ladder program P1 was executed in the specified mode after storing frequently accessed data in the cache for each of the device data, the instruction code, and the firmware module. Since the device data, the instruction code, and the firmware module are data whose access frequencies differ greatly depending on the line process, the ladder program P1 can be executed at high speed by optimizing the allocation of these data to the cache.
  • the access to the same device data is usually greater than the access to the same instruction code.
  • the instruction code and the device data are treated as similar data without distinction and the cache is optimized, only the device data is allocated to the cache.
  • the arithmetic processing may be delayed by the number of times the instruction code used in combination with the device data is executed, and the execution speed of the entire ladder program P1 may decrease.
  • the firmware module is treated separately and the cache is optimized, so that it is expected that the decrease in the execution speed is further avoided. ..
  • the storage unit 150 stores data in the cache up to the allocation upper limit of the cache memory 101, which is a predetermined number, in descending order of the frequency of access to the storage device in the designated mode. As a result, the cache hit rate in the designated mode is maximized, and the ladder program P1 can be executed at high speed.
  • Embodiment 2 the second embodiment will be described focusing on the differences from the first embodiment described above.
  • the same reference numerals are used, and the description thereof will be omitted or simplified.
  • the allocation to the cache of the firmware module is optimized for each operation mode as well as the device data and the instruction code.
  • firmware there are cases where the change in access frequency is small when the operation mode is changed. For example, there is a case where the status of the devices 30 and 31 in the line process is notified to the outside by the server regardless of the type of the line process.
  • the monitoring function it is highly likely that it will be used in all types regardless of the type of line process. In such a case, instead of changing the allocation of the firmware to the cache for each operation mode, the allocation based on the access frequency counted in the test run process for executing all the operation modes becomes effective.
  • the counting unit 130 counts the access frequency of the firmware regardless of the operation mode, instead of counting for each operation mode. Specifically, in the same test run process as in FIG. 9, the counting unit 130 counts up the common access frequency in the plurality of operation modes when the firmware module is accessed in step S25.
  • FIG. 14 shows an example of the firmware frequency storage unit 143 according to the present embodiment. As shown in FIG. 14, the access frequency when all the plurality of operation modes are executed is counted, and in the normal operation process, the firmware having a high access frequency is assigned to the cache memory 160.
  • the counting unit 130 counts the frequency of access to the storage device that occurs when the ladder program P1 is executed in a plurality of operation modes for each firmware that is the target of the access. Then, when the execution unit 120 receives the execution instruction of the ladder program P1 by the reception unit 110, the execution unit 120 refers to the firmware stored in the cache by the storage unit 150 and executes the ladder program P1 in the designated mode. As a result, the ladder program P1 can be executed at high speed after optimizing the allocation of the firmware whose access frequency is not affected by the operation mode.
  • the program execution device 100 may be a CPU unit constituting the PLC 1001.
  • the input / output units constituting the PLC 1001 together with the program execution device 100 are connected to the devices 30 and 31.
  • the test run process is executed before the normal operation process is executed, but the test run process may be omitted.
  • the access frequency for each data in the storage device is counted in the same manner as the above-mentioned test run process, and the cache in the second and subsequent normal operation processes is adjusted to the operation mode. It may be optimized.
  • the test run process may be executed only when the user requests, and the cache may be optimized while the normal operation process can be executed in a cache that is not optimized.
  • the access frequency for each data in the storage device may be counted as in the test run process, and the counting result may be used for allocating the data to the cache in the subsequent new normal operation process.
  • the internal memory of the processor 11 has been described as a cache, but a memory outside the processor 11 that can be accessed at high speed may be used as a cache.
  • the program execution device 100 may receive an operation mode designation and an execution instruction via the programming tool 200.
  • the relationship between the input state of the switch included in the program execution device 100 and the operation mode is defined by the operation mode setting information, but the present invention is not limited to this.
  • the operation mode setting information may define the relationship between the value of the specific storage area of the program execution device 100 and the operation mode. For example, if the value indicated by the address "D0" of the auxiliary storage unit 13 of the program execution device 100 is "A”, the first mode M1 is executed, and if this value is "B", the second mode M2 is executed. If it is executed and the value is "C”, the third mode M3 may be executed. If the value of this address corresponds to the state of the switch and can be rewritten from the programming tool 200, the operation mode can be specified by either the switch operation of the program execution device 100 or the programming tool 200.
  • each contact is turned on only when any one of the operation modes is executed, but the present invention is not limited to this.
  • the ladder program P1 may have contacts that are turned on in two or more operation modes among the plurality of operation modes.
  • the number of times of access to the data has been described as the frequency of access to the storage device, but the present invention is not limited to this.
  • the ratio of access for each data to the number of times access to the storage device has occurred may be used as the access frequency.
  • a flag indicating the access frequency of data whose access count exceeds a predetermined threshold value may be set.
  • the access frequency may be another degree indicating the number of accesses.
  • the frequency of access to the device data, the instruction code, and the firmware is counted as the frequency of access to the storage device, but the data for counting the frequency of access is not limited to these.
  • the device data may be the data to be accessed, or the device data and the instruction code may be the data to be accessed. Even in such a case, if the frequency of access to the storage device for each operation mode that occurs when the program is being executed can be counted, the allocation of data to the cache according to the operation mode should be optimized. Can be done.
  • the ladder program P1 written in the ladder language is executed, but the present invention is not limited to this, and the program execution device 100 may execute a program having a plurality of operation modes.
  • a program for example, a program written in C language or a program written in assembly language can be considered.
  • the function of the program execution device 100 according to the above-described embodiment can be realized by dedicated hardware or by a normal computer system.
  • the program P2 is stored and distributed in a computer-readable recording medium such as a flexible disk, a CD-ROM (CompactDiskRead-OnlyMemory), a DVD (DigitalVersatileDisk), or an MO (Magneto-Opticaldisk). Then, by installing the program P2 on the computer, it is possible to configure a device that executes the above-mentioned processing.
  • a computer-readable recording medium such as a flexible disk, a CD-ROM (CompactDiskRead-OnlyMemory), a DVD (DigitalVersatileDisk), or an MO (Magneto-Opticaldisk).
  • the program P2 may be stored in a disk device of a server device on a communication network represented by the Internet, superimposed on a carrier wave, and downloaded to a computer, for example.
  • the above process can also be achieved by starting and executing the program P2 while transferring it via a network represented by the Internet.
  • processing can also be achieved by executing the program P2 in whole or in part on the server device and executing the program P2 while the computer sends and receives information about the processing via the communication network. ..
  • the means for realizing the function of the program execution device 100 is not limited to software, and a part or all thereof may be realized by dedicated hardware or a circuit.
  • This disclosure is suitable for an apparatus that executes a program that realizes a line process.
  • 1000 control system 100 program execution device, 11 processor, 12 main memory, 13 auxiliary memory, 14 input, 15 output, 16 communication, 17 internal bus, 20 terminals, 21 users, 30, 31 devices, 101 Cache memory, 110 reception unit, 120 execution unit, 130 counting unit, 140 frequency storage unit, 141 data frequency storage unit, 142 instruction frequency storage unit, 143 firmware frequency storage unit, 150 storage unit, 160 cache memory, 161 data cache memory , 162 instruction cache memory, 163 firmware cache memory, 170 external memory, 171 data external memory, 172 instruction external memory, 173 instruction external memory, 200 programming tool, 210 program creation unit, 220 compiler, 230 setting unit, 231 operation mode setting Department, A10 process data, A11, A12 partial data, C12 to C15, C21 to C23, C31 to C33 contacts, P1 ladder program, P2 program, P3 firmware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Programmable Controllers (AREA)

Abstract

ラインにおいて異なる工程を実施するための複数の動作モードを有するプログラムを実行するプログラム実行装置(100)は、複数の動作モードそれぞれについて、プログラムが実行されているときに発生する記憶装置へのアクセスの頻度を該アクセスの対象であるデータ毎に計数する計数部(130)と、プログラムの動作モードの指定と、プログラムを実行することの指示と、を受け付ける受付部(110)と、指定の動作モードにおいて、計数部(130)によって計数された頻度が高い順にデータをキャッシュ(160)に格納する格納部(150)と、指示が受け付けられると、格納部(150)によってキャッシュ(160)に格納されたデータを参照して指定の動作モードでプログラムを実行する実行部(120)と、を備える。

Description

プログラム実行装置、プログラム実行方法及びコンピュータプログラム
 本開示は、プログラム実行装置、プログラム実行方法及びコンピュータプログラムに関する。
 FA(Factory Automation)の現場では、プロセッサによる高速な演算処理を実現するために、キャッシュを備えるPLC(Programmable Logic Controller)が利用されることがある。キャッシュは、他のメモリより高速なデータの読み出し及び書き込みが可能な記憶装置である。このため、演算処理に必要なデータがキャッシュから読み出される場合には、当該データがRAM(Random Access Memory)に代表されるメモリから読み出される場合よりも演算処理を高速に実行することが可能になる。同様に、データがキャッシュに書き込まれる場合には、演算処理を高速に実行することが可能になる。
 一般的に、キャッシュの容量が小さいため、必要なデータがキャッシュに存在しない場合には、キャッシュより容量が大きく低速なメモリのデータが利用され、演算処理に遅延が生じてしまう。このため、必要なデータへのアクセス先がキャッシュである割合を示すキャッシュヒット率は、高いことが望ましい。そこで、PLCに相当する制御装置のキャッシュヒット率を向上させるための技術が提案されている(例えば、特許文献1を参照)。
 特許文献1には、ユーザの作成したプログラムを命令コードにコンパイルする際に、命令コードに含まれるデバイスの使用頻度を分類して、使用頻度の高いデバイスの状態を表すデバイスデータを、高速に処理が可能なプロセッサの内蔵メモリに格納し、使用頻度の低いデバイスの状態を表すデバイスデータをデータ用メモリに格納するプログラマブルコントローラについて記載されている。このプログラマブルコントローラによれば、演算処理の高速化を図ることができる。
特開2010-128612号公報
 制御装置が利用される現場では、1つのプログラムにより実現される複数の異なる工程のうち、いずれか1つの工程が実施されることがある。例えば、ユーザがスイッチを押下することにより、プログラムにより規定される動作モードを変更して、実施すべき工程を切り替える場合がある。このような場合には、プログラム全体が機能することなく、スイッチの状態に応じて当該プログラムの一部が機能することとなる。
 特許文献1に記載の技術では、プログラムをコンパイルする際に命令コードを実行する上で使用頻度の高いデバイスと低いデバイスとが分類される。しかしながら、コンパイル時に観測されるデバイスの使用頻度は、上述のようなスイッチの入力状態に応じて使用されるデバイスの使用頻度とは異なる。このため、実際の運用においては使用頻度が低いデバイス又は使用されないデバイスが、キャッシュに相当する内蔵メモリに格納されてしまい、使用頻度が高いデバイスが他のメモリに格納される結果、演算処理に遅延が発生するおそれがある。したがって、ライン工程に合わせて、実行する動作モードを切り替えて複数の異なる工程を実施可能なプログラムをより高速に実行する余地がある。
 本開示は、ライン工程に合わせて、実行する動作モードを切り替えて複数の異なる工程を実施可能なプログラムをより高速に実行することを目的とする。
 上記目的を達成するため、本開示のプログラム実行装置は、ラインにおいて異なる工程を実施するための複数の動作モードを有するプログラムを実行するプログラム実行装置であって、複数の動作モードそれぞれについて、プログラムが実行されているときに発生する記憶装置へのアクセスの頻度を該アクセスの対象であるデータ毎に計数する計数手段と、プログラムの動作モードの指定と、指定した動作モードでプログラムを実行することの指示と、を受け付ける受付手段と、受付手段によって受け付けられた指定の動作モードにおいて、計数手段によって計数された頻度が高い順にデータをキャッシュに格納する格納手段と、受付手段によって指示が受け付けられると、格納手段によってキャッシュに格納されたデータを参照して指定の動作モードでプログラムを実行する実行手段と、を備える。
 本開示によれば、計数手段が、動作モードそれぞれについて、プログラムが実行されているときに発生する記憶装置へのアクセスの頻度をデータ毎に計数する。そして、格納手段は、指定の動作モードにおいてアクセスの頻度が高い順にアクセスの対象であるデータをキャッシュに格納する。これにより、実行手段がキャッシュに格納されたデータをプログラム実行時に参照する可能性が高くなる。このため、動作モードに合わせてキャッシュの状態が最適化された状態でプログラムが実行される。したがって、ライン工程に合わせて実行する動作モードを切り替えて複数の異なる工程を実施可能なプログラムをより高速に実行することができる。
実施の形態1に係る制御システムの構成を示す図 実施の形態1に係る動作モードとライン工程との対応を示す図 実施の形態1に係るプログラム実行装置のハードウェア構成を示す図 実施の形態1に係るプログラム実行装置の機能的な構成を示す図 実施の形態1に係るラダープログラムの一例を示す図 実施の形態1に係る動作モード設定情報の一例を示す図 実施の形態1に係るラダープログラムの実行時にアクセスされる記憶装置内のデータについて説明するための図 実施の形態1に係る運転処理を示すフローチャート 実施の形態1に係る試運転処理を示すフローチャート 実施の形態1に係るデータ頻度記憶部に記憶される情報の一例を示す図 実施の形態1に係る命令頻度記憶部に記憶される情報の一例を示す図 実施の形態1に係るファームウェア頻度記憶部に記憶される情報の一例を示す図 実施の形態1に係る通常運転処理を示すフローチャート 実施の形態2に係るファームウェア頻度記憶部に記憶される情報の一例を示す図 変形例に係る制御システムの構成を示す図
 以下、本開示の実施の形態に係るプログラム実行装置100について、図面を参照しつつ詳細に説明する。
 実施の形態1.
 図1には、本実施の形態に係るプログラム実行装置100を含む制御システム1000の構成が示されている。制御システム1000は、工場において形成されるシステムであって、予め設定された製造ラインに従ってワークを加工及び検査して製品を製造するためのFAシステムである。制御システム1000は、ラダープログラムP1を実行することにより機器30,31を制御して製造ラインを稼働させるプログラム実行装置100と、プログラム実行装置100による制御内容を設定するための端末20と、製造ラインに設置された機器30,31と、を有する。制御システム1000においては、複数の動作モードを有するラダープログラムP1が、端末20からプログラム実行装置100に提供され、プログラム実行装置100によって動作モード毎にキャッシュが最適化された状態で効率よく実行される。
 プログラム実行装置100と端末20とは、USB(Universal Serial Bus)ケーブル及びLANケーブルに代表される通信線により接続され、互いに信号を送受信することにより通信する。また、プログラム実行装置100と機器30,31とは、FAネットワーク又は産業用ネットワークを介して接続され、互いに信号を送受信することにより通信する。なお、プログラム実行装置100、端末20及び機器30,31による通信の形態はこれに限定されず、任意に変更してもよい。
 機器30は、例えば圧力又は温度を計測するセンサを有し、このセンサによる計測結果を示す信号を定期的にプログラム実行装置100に通知するセンサ装置である。計測結果が通知される周期は、例えば1秒間隔又は1分間隔である。機器30から通知される計測結果は、プログラム実行装置100によって制御内容を決定するために利用される。機器31は、例えばアクチュエータ又はロボットであって、機器30による計測結果に基づくプログラム実行装置100からの指令に従って動作する。機器30,31によれば、プログラム実行装置100は、製造ラインにおける計測の結果に応じてワークを処理することができる。例えば、ベルトコンベア上を通過するワークを機器30が検知したタイミングで、プログラム実行装置100は、塗装ロボットである機器31に塗料を噴射させる。なお、図1では、2つの機器30,31が代表的に示されているが、3つ以上の機器が制御システム1000を構成してもよい。また、機器30,31は、センサ、アクチュエータ及びロボットとは異なる他の機器であってもよい。
 端末20は、IPC(Industrial Personal Computer)又はプログラム実行装置100のユーザインタフェースとして用いられるGUI(Graphical User Interface)端末である。端末20は、ユーザ21が端末20を操作することで作成されたラダープログラムP1をコンパイルして、オブジェクト形式のラダープログラムP1をユーザ21の指示に従ってプログラム実行装置100に送信する。
 ラダープログラムP1は、ラダー言語で記述されたプログラムであって、ユーザ21が要望するライン工程を実現するために作成される。ラダープログラムP1は、製造ラインにおいて異なる工程を実施するための複数の動作モードを有し、この複数の動作モードのうちユーザ21から指定されたいずれか一の動作モードで実行される。図2には、ラダープログラムP1が有する3つの動作モードと、各モードで実行される工程と、の例が示されている。図2の例では、ラダープログラムP1が第1モードM1で実行されるときには、製造ラインにおいて「白色塗装」の工程が実施され、第2モードM2で実行されるときには、製造ラインにおいて「黒色塗装」の工程が実施され、第3モードM3で実行されるときには、製造ラインにおいて「塗装なし」の工程が実施される。このようなラダープログラムP1によれば、製造工程の種別を切り替えることが可能になる。
 プログラム実行装置100は、PLCに代表される制御装置である。図3には、プログラム実行装置100のハードウェア構成が模式的に示されている。図3に示されるように、プログラム実行装置100は、プロセッサ11と、主記憶部12と、補助記憶部13と、入力部14と、出力部15と、通信部16と、を有する。主記憶部12、補助記憶部13、入力部14、出力部15及び通信部16はいずれも、内部バス17を介してプロセッサ11に接続される。
 プロセッサ11は、キャッシュとしてのキャッシュメモリ101を含むMPU(Micro Processing Unit)又はCPU(Central Processing Unit)である。プロセッサ11は、補助記憶部13に記憶されるプログラムP2を実行することにより、プログラム実行装置100の後述の機能を実現して、種々の処理を実行する。プログラムP2に従ってプロセッサ11により実行される処理には、補助記憶部13に記憶されるラダープログラムP1の実行により機器30,31を制御する処理が含まれる。ラダープログラムP1は、複数の動作モードを有する実行プログラムの一例に相当し、プログラムP2は、プログラム実行装置100にコンピュータとしての機能を発揮させるためのコンピュータプログラムの一例に相当する。
 キャッシュメモリ101は、プロセッサ11の内蔵メモリである。プロセッサ11は、キャッシュメモリ101に格納されたデータについては、主記憶部12及び補助記憶部13に記憶されたデータより高速に書き込み及び読み出しをする。キャッシュメモリ101には、後述の工程データA10の一部分に相当する部分データA11がロードされる。そして、キャッシュメモリ101は、ラダープログラムP1を実行するプロセッサ11の作業領域として用いられる。
 主記憶部12は、キャッシュメモリ101より容量が大きいRAM(Random Access Memory)を含む。主記憶部12には、補助記憶部13からプログラムP2がロードされる。主記憶部12は、プログラムP2を実行するプロセッサ11の作業領域として用いられる。また、主記憶部12には、工程データA10の一部分に相当する部分データA12がロードされ、主記憶部12は、ラダープログラムP1を実行するプロセッサ11の作業領域として用いられる。
 部分データA11,A12は、工程データA10から分割されてキャッシュメモリ101と主記憶部12それぞれに割り当てられた、互いに異なるデータである。部分データA11,A12は、例えば、ラダープログラムP1を構成する一部である命令コード、ラダープログラムP1を実行する際に使用されるデバイスデータ、及び、ファームウェアモジュール、のうちの一又は複数のデータである。プロセッサ11がラダープログラムP1を実行する際には、部分データA11,A12が参照されて利用される。ここで、プロセッサ11から部分データA11へのアクセス数が、部分データA12へのアクセス数より多いほど、プロセッサ11が主記憶部12にアクセスする際の遅延が発生する回数が減少し、演算処理が高速になる。なお、部分データA11,A12は、一部の情報を重複して有するデータであってもよいし、部分データA12が部分データA11を包含してもよい。
 補助記憶部13は、EEPROM(Electrically Erasable Programmable Read-Only Memory)に代表される不揮発性メモリを含む。補助記憶部13は、プログラムP2と、製造ラインにおける工程を実施するための工程データA10と、を記憶する。補助記憶部13は、プロセッサ11の指示に従って、プロセッサ11によって利用されるデータをプロセッサ11に供給し、プロセッサ11から供給されたデータを記憶する。
 工程データA10は、ラダープログラムP1と、ラダープログラムP1が実行される際に利用されるファームウェアP3と、を含む。ラダープログラムP1が、ユーザの要望するライン工程を実現するために設計されるのに対して、ファームウェアP3は、ライン工程の設計に関わらず補助記憶部13に予め格納されるソフトウェアである。ファームウェアP3は、例えば、製造ラインに関するリアルタイムの情報をユーザに提供するためのFTP(File Transfer Protocol)サーバ又はwebサーバとして機能する。なお、補助記憶部13に予め記憶される種々のファームウェアのうち、ラダープログラムP1の実行に際して利用される一部のファームウェアP3が、工程データA10を構成する。
 入力部14は、ユーザによって操作されるスライドスイッチ及びプッシュボタンに代表される入力デバイスを含む。入力部14は、プログラム実行装置100に対してユーザ21によって入力された情報を取得して、取得した情報をプロセッサ11に通知する。出力部15は、LED(Light Emitting Diode)、LCD(Liquid Crystal Display)及びブザーに代表される出力デバイスを含む。出力部15は、プロセッサ11の指示に従って、種々の情報をユーザに提示する。
 通信部16は、外部の装置と通信するための通信インタフェース回路を含む。通信部16は、外部から信号を受信して、この信号により示されるデータをプロセッサ11へ出力する。また、通信部16は、プロセッサ11から出力されたデータを示す信号を外部の装置へ送信する。図3には、1つの通信部16が代表的に示されているが、プログラム実行装置100は、複数の通信部16を有してもよい。例えば、プログラム実行装置100は、端末20と通信するための第1の通信部16と、機器30,31と通信するための第2の通信部16と、を別個に有してもよい。
 プログラム実行装置100は、上述のハードウェア構成が協働することにより、図4に示されるように、種々の機能を発揮する。なお、図4には、プログラム実行装置100の機能的な構成に加えて、端末20によって実現されるプログラミングツール200の機能が併せて示されている。プログラミングツール200は、ユーザ21がラダー言語でプログラミングをするためのツールとして、端末20が特定のプログラムを実行することにより実現される。プログラミングツール200は、ユーザ21がGUIを操作してラダープログラムP1を作成するためのプログラム作成部210と、ラダー言語で記述されたラダープログラムP1をプログラム作成部210から取得してコンパイルするコンパイラ220と、ラダープログラムP1に関してユーザ21が種々のパラメータを設定するための設定部230と、を有する。設定部230は、ラダープログラムP1の動作モードと、プログラム実行装置100に対する入力状態と、の対応関係をユーザ21が設定するための動作モード設定部231を有する。
 ここで、動作モード設定部231によって設定される動作モードと動作モードに合わせてONとOFFを切り替える接点との関係について説明する。図5には、ラダープログラムP1の一例が示されている。このラダープログラムP1は、第1モードM1の実行時にON状態になる接点C11,C12,C13,C14,C15と、第2モードM2の実行時にON状態になる接点C21,C22,C23と、第3モードM3の実行時にON状態になる接点C31,C32,C33と、を有する。各モードでON状態になる接点はいずれも、他のモードが実行されるときにはOFF状態になる。例えば、第1モードM1の実行時において接点C21~C23,C31~C33はいずれもOFF状態になる。
 接点C11がON状態になると、接点C11と接続されるように記述された「命令コードi11 DD11 DD12」という命令が実行されるが、接点C11がOFF状態であれば、この命令は実行されない。同様に、接点C12がON状態であれば「命令コードi12 DD13 DD14」という命令が実行され、接点C13がON状態であれば「命令コードi13 DD15 DD16」という命令が実行され、接点C14がON状態であれば「命令コードi14 DD17」という命令が実行され、接点C15がON状態であれば「命令コードi15」という命令が実行される。一方、接点C12~C15がOFF状態であれば、これらの命令は実行されない。接点C21~C23,C31~C33の直後に記述された命令についても、接点の状態に応じて実行の有無が決定される。このようにして、動作モードに対応して異なる演算処理が実行される。
 図5に示されるように、ラダープログラムP1自体は、動作モードに関する情報を含んでいない。プログラム実行装置100の入力状態と、この入力状態に対応する動作モードでON状態とすべき接点との対応関係は、ユーザにより設定される。図6には、ユーザにより設定される動作モード設定情報が例示されている。この動作モード設定情報は、動作モードと、この動作モードに対応する入力状態と、この動作モードにおける接点の状態と、を関連付けるテーブル形式のデータである。図6の例は、プログラム実行装置100の入力部14であるスライドスイッチの位置を入力状態として、接点の状態が図5に示されたように切り替えられることを示している。
 図4に戻り、プログラム実行装置100は、ラダープログラムP1の実行を各動作モードで予め試行することで、その後に、ユーザ21から指定される動作モードにおいてデータの割り当てを最適化した上でラダープログラムP1を実行する機能を有する。詳細には、プログラム実行装置100は、その機能として、ラダープログラムP1及び動作モード設定情報の提供をプログラミングツール200から受け付けて、当該ラダープログラムP1を実行する際の動作モードの指定及び実行指示をユーザ21から受け付ける受付部110と、ラダープログラムP1を実行する実行部120と、ラダープログラムP1の動作モードそれぞれについて、実行時における記憶装置へのアクセス頻度を計数する計数部130と、計数部130によって計数された頻度を示す情報を記憶するデータ頻度記憶部141、命令頻度記憶部142及びファームウェア頻度記憶部143と、計数された頻度及び指定された動作モードに基づいてデータを異なる記憶領域に割り当てて格納する格納部150と、比較的高速にアクセス可能なデータキャッシュメモリ161、命令キャッシュメモリ162及びファームウェアキャッシュメモリ163と、データキャッシュメモリ161、命令キャッシュメモリ162及びファームウェアキャッシュメモリ163のそれぞれに比べてアクセスに時間がかかるデータ外部メモリ171、命令外部メモリ172及びファームウェア外部メモリ173と、を有する。
 以下では、データ頻度記憶部141、命令頻度記憶部142及びファームウェア頻度記憶部143を総称して頻度記憶部140と適宜表記する。また、データキャッシュメモリ161、命令キャッシュメモリ162及びファームウェアキャッシュメモリ163を総称してキャッシュメモリ160と適宜表記する。また、データ外部メモリ171、命令外部メモリ172及びファームウェア外部メモリ173を総称して外部メモリ170と適宜表記する。
 受付部110は、主としてプロセッサ11、入力部14及び通信部16の協働により実現される。受付部110は、コンパイラ220によって生成されたオブジェクト形式のラダープログラムP1と、設定部230により設定されたパラメータと、の提供をプログラミングツール200から受け付ける。プログラミングツール200から提供されるパラメータには、図6に例示された動作モード設定情報が含まれる。そして、受付部110は、提供されたラダープログラムP1及びパラメータを実行部120に送出する。
 また、受付部110は、ユーザ21が操作したスイッチの入力状態により示される動作モードの指定と、各動作モードに対する最適化指示と、プッシュボタンの押下により示されるラダープログラムP1の実行指示と、を受け付ける。最適化指示は、各動作モードについてキャッシュの最適化を実行することの指示である。例えば、第1モードM1の実行に際してキャッシュを最適化する一方で、第2モードM2の実行に際してキャッシュを最適化しない場合には、第1モードM1の最適化指示が入力される。以下では、すべての動作モードについて最適化指示が入力される例を中心に説明する。受付部110は、受け付けた指定の動作モードと実行指示とを実行部120に通知する。受付部110は、プログラム実行装置100において、プログラムの動作モードの指定と、指定した動作モードでプログラムを実行することの指示と、を受け付ける受付ステップを実行する受付手段の一例に相当する。
 実行部120は、主としてプロセッサ11により実現される。実行部120は、ラダープログラムP1及びパラメータが受付部110から送出されると、動作モードそれぞれにおけるデータの使用頻度を計数するために、ラダープログラムP1を各動作モードで予備的に実行する。詳細には、実行部120は、動作モード設定情報により示される各動作モードに対応する接点をON状態とした上でラダープログラムP1に規定された命令を実行する。プログラム実行装置100は、各動作モードで試運転を実行することとなる。そして、実行部120は、各動作モードでラダープログラムP1を実行する際に発生する記憶装置へのアクセス頻度のデータ毎の計数を計数部130に指示する。ここで、試運転のときに利用される記憶装置は、主記憶部12のみであってもよいし、最適化されていない状態でデータが割り当てられたキャッシュメモリ101及び主記憶部12であってもよい。
 さらに、実行部120は、動作モードの指定及びラダープログラムP1の実行指示が最適化指示とともに受付部110から通知されると、指定モードにおけるアクセス頻度の計数結果に基づいてデータをキャッシュメモリ160及び外部メモリ170に割り当てて格納することを格納部150に指示する。ここで、指定モードは、ユーザ21のスイッチ操作により指定された動作モードを意味する。そして、実行部120は、指定モードでラダープログラムP1を実行する。詳細には、実行部120は、動作モード設定情報において現在の入力状態に対応する指定モードを判定し、この指定モードに対応する接点をON状態とした上でラダープログラムP1に規定された命令を実行する。プログラム実行装置100は、指定モードに合わせて最適化されたキャッシュメモリ160を利用して通常運転を実行することとなる。実行部120は、プログラム実行装置100において、受付手段によってプログラムを実行する指示が受け付けられると、格納手段によってキャッシュに格納されたデータを参照して指定の動作モードでプログラムを実行する実行ステップを実行する実行手段の一例に相当する。
 計数部130は、主としてプロセッサ11によって実現される。計数部130は、実行部120からの指示に従って、各動作モードが実行されるときの記憶装置へのアクセス頻度を、アクセスの対象であるデータ毎に計数する。記憶装置へのアクセスは、通常、データの読み出し及び書き込みのいずれも該当するが、計数部130は、読み出し及び書き込みのいずれか一方のみのアクセス頻度を計数してもよい。すなわち、計数部130は、一の動作モードにてラダープログラムP1を実行する際に、データの読み出し及び書き込みを行うために記憶装置にアクセスした回数をデータ毎に計数することで、データ毎のアクセス頻度を計数する。計数部130は、この計数を、最適化指示を受けつけた動作モードについて実行する。そして、計数部130は、計数結果を頻度記憶部140に格納する。計数部130は、プログラム実行装置100において、複数の動作モードそれぞれについて、実行手段によってプログラムが実行されているときに発生する記憶装置へのアクセスの頻度を該アクセスの対象であるデータ毎に計数する計数ステップを実行する計数手段の一例に相当する。
 データ頻度記憶部141、命令頻度記憶部142及びファームウェア頻度記憶部143はそれぞれ、主として補助記憶部13によって実現される。ここで、ラダープログラムP1の実行により発生する記憶装置へのアクセスについて、図7を参照して説明する。図7の上部には、図5に例示されたラダープログラムP1の一部が示されている。図7に示されるように、接点C11がON状態のときに実行される「命令コードi11 DD11 DD12」という命令は、命令コード「命令コードi11」と、数値又は文字列であるデバイスデータ「DD11」及び「DD12」と、を含む。
 デバイスデータは、例えば、センサの検知結果、機器30,31に設定されているパラメータ、その他の機器30,31の稼働状態をリアルタイムに表す数値若しくは文字列、又は、変数により若しくは固定値として示される数値若しくは文字列のデータである。命令コードは、プロセッサ11の命令セットに含まれる演算命令であって、例えば、デバイスデータを対象とする加算命令、転送命令、又は条件分岐命令である。さらに、命令コードの種類によって、ファームウェアを構成するファームウェアモジュールが参照される。例えば、機器30の検知結果をwebサーバに通知する命令コードが実行されるときには、webサーバを実現するためのファームウェアモジュールが適宜参照される。
 このように、ラダープログラムP1が実行されると、デバイスデータ、命令コード及びファームウェアモジュールへのアクセスが発生するため、デバイスデータ、命令コード及びファームウェアモジュールは、図3に示された工程データA10を構成し、キャッシュメモリ101及び主記憶部12にロードされてプロセッサ11により適宜利用されることとなる。なお、ファームウェアモジュールは、図3中のファームウェアP3に相当する。なお、デバイスデータ、命令コード及びファームウェアモジュールは、記憶装置へのアクセスの頻度を計数するためのアクセスの対象であるデータの一例である。
 図4に戻り、データ頻度記憶部141には、記憶装置へのアクセスとして、デバイスデータへのアクセスが発生した頻度を計数部130によって計数した計数結果が格納される。命令頻度記憶部142には、記憶装置へのアクセスとして、命令コードへのアクセスが発生した頻度を計数部130によって計数した計数結果が格納される。ファームウェア頻度記憶部143には、記憶装置へのアクセスとして、ファームウェアモジュールへのアクセスが発生した頻度を計数部130によって計数した計数結果が格納される。
 格納部150は、主としてプロセッサ11により実現される。格納部150は、実行部120からの指示に従って、指定モードにおいて計数されたデータ毎の記憶装置へのアクセスの頻度を頻度記憶部140から読み出す。そして、格納部150は、指定モードの中で、頻度が高い順にアクセス対象であるデータをキャッシュメモリ160に格納して、キャッシュメモリ160に格納しなかった他のデータを外部メモリ170に格納することにより、データの配置を最適化する。
 詳細には、格納部150は、データ頻度記憶部141に格納された計数結果に基づいて、指定モードにおけるアクセス頻度が高い方から順に予め定められた個数のデバイスデータをデータキャッシュメモリ161に格納し、データキャッシュメモリ161に格納しなかった他のデバイスデータをデータ外部メモリ171に格納する。同様に、格納部150は、命令頻度記憶部142に格納された計数結果に基づいて、指定モードにおけるアクセス頻度が高い方から順に予め定められた個数の命令コードを命令キャッシュメモリ162に格納し、命令キャッシュメモリ162に格納しなかった他の命令コードを命令外部メモリ172に格納する。また、格納部150は、ファームウェア頻度記憶部143に格納された計数結果に基づいて、指定モードにおけるアクセス頻度が高い方から順に予め定められた個数のファームウェアモジュールをファームウェアキャッシュメモリ163に格納し、ファームウェアキャッシュメモリ163に格納しなかった他のファームウェアモジュールをファームウェア外部メモリ173に格納する。各キャッシュメモリ160に格納されるデータの個数は、各キャッシュメモリ160の容量に従って予め定められる。例えば、格納部150は、頻度の高いデータから順に各キャッシュメモリ160に書き込める最大数のデータをキャッシュメモリ160に書き込む。格納部150は、プログラム実行装置100において、受付手段によって受け付けられた指定の動作モードにおいて、計数手段によって計数された頻度が高い順にデータをキャッシュに格納する格納ステップを実行する格納手段の一例に相当する。
 データキャッシュメモリ161、命令キャッシュメモリ162及びファームウェアキャッシュメモリ163はそれぞれ、主としてキャッシュメモリ101によって実現される。データキャッシュメモリ161には、指定モードに合わせてアクセス頻度が高い順にデバイスデータが格納部150によって格納される。また、命令キャッシュメモリ162には、指定モード合わせてアクセス頻度が高い順に命令コードが格納され、ファームウェアキャッシュメモリ163には、指定モード合わせてアクセス頻度が高い順にファームウェアモジュールが格納される。これらのキャッシュメモリ160に格納されたデータは、指定モードでラダープログラムP1が実行されるときに実行部120により参照されて利用される。
 データ外部メモリ171、命令外部メモリ172及びファームウェア外部メモリ173は、主として主記憶部12によって実現される。データ外部メモリ171には、指定モードにおいてアクセス頻度が比較的低いデバイスデータが格納部150によって格納される。また、命令外部メモリ172には、指定モードにおいてアクセス頻度が比較的低い命令コードが格納され、ファームウェア外部メモリ173には、指定モードにおいてアクセス頻度が比較的低いファームウェアモジュールが格納される。これらの外部メモリ170に格納されたデータは、指定モードでラダープログラムP1が実行されるときに実行部120により参照されて利用される。
 続いて、プログラム実行装置100によって実行される運転処理について、図8~13を用いて詳細に説明する。図8には、プログラム実行装置100に電源が投入されることで実行される運転処理の流れが示されている。なお、この運転処理の流れは、プログラム実行装置100の機能が発揮される順番を示す一例であって、任意に変更してもよい。
 運転処理では、プログラム実行装置100は、ユーザ21によって作成されたラダープログラムP1及びパラメータをプログラミングツール200から受け付ける(ステップS1)。具体的には、受付部110が、プログラミングツール200から送信されるラダープログラムP1及び動作モード設定情報を含むパラメータを示す情報を受信することにより受け付ける。
 次に、プログラム実行装置100は、アクセス頻度を計数するための試運転処理を実行する(ステップS2)。図9には、この試運転処理の詳細が示されている。図9に示されるように、試運転処理では、受付部110が、試運転の実行指示をプログラミングツール200から受け付けたか否かを判定する(ステップS20)。試運転の実行指示は、例えば、プログラミングツール200のGUIにおいて「試運転の開始」又は「最適化の実行」というボタンをユーザ21がクリックすることにより入力される。なお、最適化の実行は指定モードすべてについて実行してもよいし、最適化する動作モードをユーザが選択してもよい。
 試運転の実行指示を受け付けていないと判定した場合(ステップS20;No)、受付部110は、ステップS20の判定を繰り返して、試運転の実行指示を受け付けるまで待機する。一方、試運転の実行指示を受け付けたと判定した場合(ステップS20;Yes)、受付部110は、動作モード毎の試行サイクル数を受け付ける(ステップS21)。PLCであるプログラム実行装置100は、通常、ラダープログラムP1により規定される処理を繰り返し実行する。ラダープログラムに条件分岐が含まれる場合、ラダープログラムP1の1回の実行のみでは、実行されない部分プログラムが存在する場合があり、最適化に十分な計数結果を得ることができないおそれがある。そのため、試運転処理においてはユーザが要望する回数だけラダープログラムP1が反復して実行される。受付部110は、この回数としての試行サイクル数を動作モード毎に受け付ける。なお、受付部110は、試行サイクル数を、試運転の実行指示より前に受け付けてもよいし、試運転の実行指示と同時に受け付けてもよい。
 次に、実行部120は、動作モード設定情報により規定される複数の動作モードから、未選択の1つの動作モードを選択する(ステップS22)。動作モードを選択する順序は任意である。例えば、このステップS22が初めて実行されるときに、実行部120は、動作モード設定情報において最初に規定されている第1モードM1を選択し、ステップS22が再度実行されるときには、動作モード設定情報により規定される順に従って動作モードを1つ選択する。
 次に、実行部120は、サイクル数Cに初期値として1を代入する(ステップS23)。サイクル数Cは、実行中のラダープログラムP1が何回目のサイクルであるかを示す変数である。
 次に、実行部120は、ステップS22で選択した動作モードでラダープログラムP1を1サイクルだけ実行する(ステップS24)。例えば、実行部120は、ステップS22で第1モードM1を選択したときには、図5の上部に示される5つの命令コードを順に1回ずつ実行する。
 次に、計数部130は、ステップS24におけるラダープログラムP1の実行を監視して、記憶装置へのアクセス頻度として、デバイスデータ、命令コード及びファームウェアそれぞれへのアクセス頻度を計数する(ステップS25)。具体的には、計数部130は、ラダープログラムP1に含まれる命令が順に実行される度に、当該命令に含まれる命令コード及びデバイスデータと、当該命令によりファームウェアモジュールが実行される場合における当該ファームウェアモジュールと、を特定して、特定した命令コード、デバイスデータ及びファームウェアモジュールについて頻度記憶部140に記憶されるアクセス頻度に1を加算する。
 例えば、「命令コードi11 DD11 DD12」という命令が実行され、この命令により「ファームウェアモジュール1」が併せて実行される場合に、計数部130は、命令コード「命令コードi11」、デバイスデータ「DD11」、デバイスデータ「DD12」、及び「ファームウェアモジュール1」それぞれのアクセス頻度をカウントアップする。その後に同一の命令コード「命令コードi11」を含む命令が再度実行された場合には、当該命令コードのアクセス頻度がさらにカウントアップされる。なお、命令の実行にファームウェアモジュールの実行が伴わない場合には、計数部130は、ファームウェアモジュールのアクセス頻度を変更しない。
 ステップS25に続いて、実行部120は、サイクル数Cが、ステップS21において受け付けた試行サイクル数のうちステップS22で選択した動作モードに対応する試行サイクル数に等しいか否かを判定する(ステップS26)。これにより、選択された動作モードにおける試運転を終了すべきか否かが判定される。
 サイクル数Cが試行サイクル数に等しくないと判定した場合(ステップS26;No)、実行部120は、サイクル数Cに1を加算して(ステップS27)、ステップS24以降の処理を繰り返す。これにより、試行サイクル数に等しい回数だけラダープログラムP1が実行される。
 一方、サイクル数Cが試行サイクル数に等しいと判定した場合(ステップS26;Yes)、実行部120は、最適化指示を受け付けた動作モードをすべて選択したか否かを判定する(ステップS28)。具体的には、実行部120は、動作モード設定情報により規定された複数の動作モードのいずれについてもステップS22にて選択したか否かを判定する。
 最適化指示を受け付けた動作モードをすべて選択していないと判定した場合(ステップS28;No)、実行部120は、ステップS22以降の処理を繰り返す。これにより、未選択の動作モードについて試運転が実行されてアクセス頻度が計数される。一方、最適化指示を受け付けた動作モードをすべて選択したと判定された場合(ステップS28;Yes)、試運転処理が終了する。
 図10には、試運転処理が終了した時点でデータ頻度記憶部141に記憶装置へのアクセスの頻度として記憶されるデバイスデータ毎のアクセス数が例示されている。図10の例では、第1モードM1のときには、デバイスデータ「DD11」及び「DD12」のアクセス頻度が他のデバイスデータより多いことがわかる。同様に、図11には、命令頻度記憶部142に記憶装置へのアクセスの頻度として記憶される命令コード毎のアクセス数が例示され、図12には、ファームウェア頻度記憶部143に記憶装置へのアクセスの頻度として記憶されるファームウェアモジュール毎のアクセス数が例示されている。
 図8に戻り、ステップS2の試運転処理に続いて、ユーザ21が要望するライン工程を実際に稼働させるための通常運転処理が実行される(ステップS3)。図13には、この通常運転処理の詳細が示されている。図13に示されるように、通常運転処理では、受付部110が、指定モード及び実行指示を受け付けたか否かを判定する(ステップS30)。具体的には、受付部110が、ユーザ21により操作されたスイッチの入力状態に対応する動作モードを動作モード設定情報から特定することにより指定モードを受け付けるとともに、ラダープログラムP1を実行するためのプッシュボタンの押下による実行指示を受け付けたか否かを判定する。
 指定モード及び実行指示を受け付けていないと判定した場合(ステップS30;No)、受付部110は、ステップS30の判定を繰り返して、指定モード及び実行指示を受け付けるまで待機する。
 一方、指定モード及び実行指示を受け付けたと判定された場合(ステップS30;Yes)、格納部150は、データ頻度記憶部141において指定モードに対応するアクセス頻度を参照して、アクセス頻度が他のデバイスデータより高いデバイスデータをデータキャッシュメモリ161に割り当て可能な数、又は、ユーザ21によって指定された数だけ割り当てて格納する(ステップS31)。例えば、指定モードが第1モードM1であり、データキャッシュメモリ161に割り当て可能なデータの数が2つである場合に、図10に示されるデータ頻度記憶部141に基づいて、記憶装置へのアクセスの頻度が高い順にデバイスデータ「DD11」及び「DD12」がデータキャッシュメモリ161に割り当てられ、他のデバイスデータ「DD13」~「DD16」がデータ外部メモリ171に割り当てられる。
 次に、格納部150は、命令頻度記憶部142において指定モードに対応するアクセス頻度を参照して、アクセス頻度が他の命令コードより高い命令コードを命令キャッシュメモリ162に割り当て可能な数、又は、ユーザ21によって指定された数だけ割り当てて格納する(ステップS32)。例えば、指定モードが第1モードM1であり、命令キャッシュメモリ162に割り当て可能なデータの数が1つである場合に、図11に示される命令頻度記憶部142に基づいて、記憶装置へのアクセスの頻度が高い順に命令コード「命令コードi11」が命令キャッシュメモリ162に割り当てられ、他の命令コード「命令コードi12」及び「命令コードi13」が命令外部メモリ172に割り当てられる。
 次に、格納部150は、ファームウェア頻度記憶部143において指定モードに対応するアクセス頻度を参照して、アクセス頻度が他のファームウェアモジュールより高いファームウェアモジュールを、ファームウェアキャッシュメモリ163に割り当て可能な数、または、ユーザ21によって指定された数だけ割り当てて格納する(ステップS33)。例えば、指定モードが第1モードM1であり、ファームウェアキャッシュメモリ163に割り当て可能なデータの数が1つである場合に、図12に示されるファームウェア頻度記憶部143に基づいて、記憶装置へのアクセスの頻度が高い順に「ファームウェアモジュール1」がファームウェアキャッシュメモリ163に割り当てられ、他の「ファームウェアモジュール2」がファームウェア外部メモリ173に割り当てられる。
 次に、実行部120は、ラダープログラムP1を実行する。これにより、指定モードにおいてアクセス頻度が高いデータがキャッシュメモリ160に格納された状態でラダープログラムP1が実行される。なお、実行部120は、ステップS31~S33以降は、通常運転処理が終了するまでキャッシュへのデータの割り当てを変更することなくラダープログラムP1を実行するが、通常運転処理の実行中に必要に応じてキャッシュへのデータの割り当てを変更してもよい。その後、通常運転処理が終了する。
 図8に戻り、ステップS3の通常運転処理に続いて、再度、ステップS3が実行される。これにより、ユーザ21が要望する指定モードに最適化された状態での通常運転処理が再度実行されることとなる。
 以上、説明したように、試運転処理において、実行部120が、複数の動作モードそれぞれでラダープログラムP1を実行し、計数部130が、動作モードそれぞれについて、ラダープログラムP1が実行されているときに発生する記憶装置へのアクセスの頻度をデータ毎に計数する。そして、通常運転処理において、格納部150は、指定モードにおいてアクセス頻度が高い順にデータをキャッシュに格納する。これにより、実行部120がキャッシュに格納されたデータを、指定モードでラダープログラムP1を実行するときに参照する可能性が高くなる。このため、指定モードに合わせてキャッシュが最適化された状態でラダープログラムP1が実行される。例えば、図10に示される例において、第1モードM1の実行時には、比較的アクセス頻度が低いデバイスデータ「DD13」~「DD16」及びアクセスが発生しないデバイスデータ「DD21」,「DD22」をキャッシュメモリ160に割り当てたことによる遅延を発生させることなく、ラダープログラムP1を実行することができる。すなわち、ラダープログラムP1のうち指定モードにおいては実行されない部分をキャッシュに割り当ててしまうことがない。したがって、ライン工程に合わせて実行する動作モードを切り替えて複数の異なる工程を実施するためのラダープログラムP1をより高速に実行することができる。
 また、デバイスデータ、命令コード、ファームウェアモジュールそれぞれについて、アクセス頻度が高いデータをキャッシュに格納した上で、指定モードでラダープログラムP1が実行された。デバイスデータ及び命令コード及びファームウェアモジュールは、ライン工程によってアクセス頻度が大きく異なるデータであるため、これらのデータのキャッシュへの割り当てを最適化することで、ラダープログラムP1を高速に実行することができる。
 ラダープログラムP1により規定される処理では通常、同一の命令コードへのアクセスよりも同一のデバイスデータへのアクセスの方が多くなる場合が多い。このような場合において、命令コードとデバイスデータとを区別することなく同様のデータとして扱ってキャッシュを最適化すると、デバイスデータばかりがキャッシュに割り当てられてしまう。その結果、デバイスデータと組み合わせて利用される命令コードが実行される回数だけ演算処理に遅延が生じてしまい、ラダープログラムP1全体の実行速度が低下するおそれがある。
 これに対して本実施の形態に係るプログラム実行装置100によれば、デバイスデータと命令コードとを区別して、それぞれについてキャッシュを最適化するため、ラダープログラムP1の実行速度の低下を回避することができる。このように、データの種類に応じてキャッシュを最適化することが望ましい。本実施の形態に係るプログラム実行装置100では、デバイスデータと命令コードに加えて、ファームウェアモジュールを区別して扱った上でキャッシュを最適化するため、実行速度の低下をさらに回避することが期待される。
 また、格納部150は、指定モードにおける記憶装置へのアクセスの頻度が高い順に、予め定められた個数であるキャッシュメモリ101の割り当て上限までデータをキャッシュに格納した。これにより、指定モードにおけるキャッシュヒット率が最大になり、ラダープログラムP1を高速に実行することができる。
 実施の形態2.
 続いて、実施の形態2について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。
 上記実施の形態1では、デバイスデータ及び命令コードと同様に、ファームウェアモジュールについてもキャッシュへの割り当てが動作モード毎に最適化された。しかしながら、ファームウェアについては、動作モードを変更したときのアクセス頻度の変化が少ないケースがある。例えば、ライン工程における機器30,31の状態をサーバにより外部に通知することが、ライン工程の種別に関わらず行われるケースがある。また,例えば監視機能が使用される場合は,ライン工程の種別に関わらず,全種別において使用される可能性が高い。このような場合には、動作モード毎にファームウェアのキャッシュへの割り当てを変更するのではなく、すべての動作モードを実行する試運転処理において計数されたアクセス頻度に基づく割り当てが有効となる。
 本実施の形態に係る計数部130は、ファームウェアのアクセス頻度を、動作モードそれぞれについて計数するのに代えて、動作モードに関わらず計数する。具体的には、図9と同様の試運転処理において、計数部130は、ステップS25においてファームウェアモジュールへのアクセスがあったときに複数の動作モードで共通のアクセス頻度をカウントアップする。
 図14には、本実施の形態に係るファームウェア頻度記憶部143の一例が示されている。図14に示されるように、複数の動作モードすべてが実行されたときのアクセス頻度が計数されて、通常運転処理では、アクセス頻度が高いファームウェアがキャッシュメモリ160に割り当てられる。
 以上、説明したように、計数部130は、ラダープログラムP1が複数の動作モードで実行されるときに発生する記憶装置へのアクセスの頻度を該アクセスの対象であるファームウェア毎に計数する。そして、実行部120は、受付部110によってラダープログラムP1の実行指示が受け付けられると、格納部150によってキャッシュに格納されたファームウェアを参照して指定モードでラダープログラムP1を実行する。これにより、動作モードにアクセス頻度が影響されないファームウェアの割り当てを最適化した上で、ラダープログラムP1を高速に実行することができる。
 以上、本開示の実施の形態について説明したが、本開示は上記実施の形態によって限定されるものではない。
 例えば、上記実施の形態では、プログラム実行装置100がPLCである例について説明したが、これには限定されない。プログラム実行装置100は、図15に示されるように、PLC1001を構成するCPUユニットであってもよい。図15に示される例では、プログラム実行装置100とともにPLC1001を構成する入出力ユニットが機器30,31と接続される。
 また、上記実施の形態では、通常運転処理を実行する前に試運転処理が実行されたが、試運転処理を省略してもよい。例えば、各動作モードを実行する初回の通常運転処理において、上述の試運転処理と同様に記憶装置におけるデータ毎のアクセス頻度を計数して、2回目以降の通常運転処理におけるキャッシュを動作モードに合わせて最適化してもよい。また、試運転処理を必須の処理とせずに、通常運転処理を最適化されていないキャッシュで実行可能としつつ、ユーザが要望する場合に限って試運転処理を実行してキャッシュを最適化してもよい。
 また、通常運転処理において、試運転処理と同様に記憶装置におけるデータ毎へのアクセス頻度を計数して、計数結果をその後の新たな通常運転処理におけるキャッシュへのデータの割り当てに利用してもよい。これにより、試運転処理の試行サイクル数が不十分であっても、通常運転処理が実行される度に動作モードに合わせたキャッシュの割り当てを最適化することができる。
 また、上記実施の形態では、プロセッサ11の内蔵メモリをキャッシュとして説明したが、プロセッサ11の外部にある高速にアクセス可能なメモリをキャッシュとしてもよい。
 また、上記実施の形態では、動作モードの指定及びラダープログラムP1の実行指示が、プログラム実行装置100のスイッチ操作により入力される例について説明したが、これには限定されない。プログラム実行装置100は、プログラミングツール200を介して動作モードの指定及び実行指示を受け付けてもよい。
 また、上記実施の形態では、プログラム実行装置100が備えるスイッチの入力状態と動作モードとの関係が動作モード設定情報により規定されたが、これには限定されない。動作モード設定情報は、プログラム実行装置100が有する特定の記憶領域の値と、動作モードとの関係を規定してもよい。例えば、プログラム実行装置100の補助記憶部13の「D0」というアドレスにより示される値が「A」であれば第1モードM1を実行し、この値が「B」であれば第2モードM2を実行し、値が「C」であれば第3モードM3を実行するものとしてもよい。このアドレスの値が、スイッチの状態に対応するとともにプログラミングツール200から書き換え可能であれば、プログラム実行装置100のスイッチ操作と、プログラミングツール200と、のいずれでも動作モードを指定することができる。
 また、図5の例では、接点それぞれが、いずれか一の動作モードの実行時のみにON状態になったが、これには限定されない。ラダープログラムP1は、複数の動作モードのうち2以上の動作モードでON状態となる接点を有してもよい。
 また、上記実施の形態では、データへのアクセス回数を記憶装置へのアクセスの頻度として説明したが、これには限定されない。例えば、記憶装置へのアクセスが発生した回数のうちデータ毎のアクセスの割合をアクセス頻度としてもよい。また、アクセス回数が予め定められた閾値を超えたデータのアクセス頻度を示すフラグを立ててもよい。アクセスの多さを示すその他の度合いをアクセス頻度としてもよい。
 上記実施の形態では、記憶装置へのアクセスの頻度として、デバイスデータ、命令コード及びファームウェアそれぞれへのアクセスの頻度を計数したが、アクセスの頻度を計数するデータは、これらに限られない。例えば、デバイスデータのみをアクセスの対象であるデータとしてもよいし、デバイスデータと命令コードとの2つをアクセスの対象であるデータとしてもよい。このような場合でも、プログラムが実行されているときに発生する動作モード毎の記憶装置へのアクセスの頻度を計数できていれば、動作モードに合わせたキャッシュへのデータの割り付けを最適化することができる。
 また、上記実施の形態では、ラダー言語で記述されたラダープログラムP1が実行されたが、これには限定されず、プログラム実行装置100は、複数の動作モードを有するプログラムを実行してもよい。このようなプログラムとしては、例えば、C言語で記述されたプログラム或いはアセンブリ言語で記述されたプログラムが考えられる。
 上述の実施形態に係るプログラム実行装置100の機能は、専用のハードウェアによっても、また、通常のコンピュータシステムによっても実現することができる。
 例えば、プログラムP2を、フレキシブルディスク、CD-ROM(Compact Disk Read-Only Memory)、DVD(Digital Versatile Disk)、MO(Magneto-Optical disk)に代表されるコンピュータ読み取り可能な記録媒体に格納して配布し、そのプログラムP2をコンピュータにインストールすることにより、上述の処理を実行する装置を構成することができる。
 また、プログラムP2をインターネットに代表される通信ネットワーク上のサーバ装置が有するディスク装置に格納しておき、例えば、搬送波に重畳させて、コンピュータにダウンロードするようにしてもよい。
 また、インターネットに代表されるネットワークを介してプログラムP2を転送しながら起動実行することによっても、上述の処理を達成することができる。
 さらに、プログラムP2の全部又は一部をサーバ装置上で実行させ、その処理に関する情報をコンピュータが通信ネットワークを介して送受信しながらプログラムP2を実行することによっても、上述の処理を達成することができる。
 なお、上述の機能を、OS(Operating System)が分担して実現する場合又はOSとアプリケーションとの協働により実現する場合には、OS以外の部分のみを媒体に格納して配布してもよく、また、コンピュータにダウンロードしてもよい。
 また、プログラム実行装置100の機能を実現する手段は、ソフトウェアに限られず、その一部又は全部を専用のハードウェア又は回路によって実現してもよい。
 本開示は、本開示の広義の精神と範囲を逸脱することなく、様々な実施の形態及び変形が可能とされるものである。また、上述した実施の形態は、本開示を説明するためのものであり、本開示の範囲を限定するものではない。つまり、本開示の範囲は、実施の形態ではなく、請求の範囲によって示される。そして、請求の範囲内及びそれと同等の開示の意義の範囲内で施される様々な変形が、本開示の範囲内とみなされる。
 本開示は、ライン工程を実現するプログラムを実行する装置に適している。
 1000 制御システム、 100 プログラム実行装置、 11 プロセッサ、 12 主記憶部、 13 補助記憶部、 14 入力部、 15 出力部、 16 通信部、 17 内部バス、 20 端末、 21 ユーザ、 30,31 機器、 101 キャッシュメモリ、 110 受付部、 120 実行部、 130 計数部、 140 頻度記憶部、 141 データ頻度記憶部、 142 命令頻度記憶部、 143 ファームウェア頻度記憶部、 150 格納部、 160 キャッシュメモリ、 161 データキャッシュメモリ、 162 命令キャッシュメモリ、 163 ファームウェアキャッシュメモリ、 170 外部メモリ、 171 データ外部メモリ、 172 命令外部メモリ、 173 ファームウェア外部メモリ、 200 プログラミングツール、 210 プログラム作成部、 220 コンパイラ、 230 設定部、 231 動作モード設定部、 A10 工程データ、 A11,A12 部分データ、 C12~C15,C21~C23,C31~C33 接点、 P1 ラダープログラム、 P2 プログラム、 P3 ファームウェア

Claims (8)

  1.  ラインにおいて異なる工程を実施するための複数の動作モードを有するプログラムを実行するプログラム実行装置であって、
     前記複数の動作モードそれぞれについて、前記プログラムが実行されているときに発生する記憶装置へのアクセスの頻度を該アクセスの対象であるデータ毎に計数する計数手段と、
     前記プログラムの動作モードの指定と、指定した動作モードで前記プログラムを実行することの指示と、を受け付ける受付手段と、
     前記受付手段によって受け付けられた指定の動作モードにおいて、前記計数手段によって計数された前記頻度が高い順に前記データをキャッシュに格納する格納手段と、
     前記受付手段によって前記指示が受け付けられると、前記格納手段によって前記キャッシュに格納された前記データを参照して前記指定の動作モードで前記プログラムを実行する実行手段と、を備える、
     プログラム実行装置。
  2.  前記計数手段は、前記複数の動作モードそれぞれについて、前記頻度を該アクセスの対象であって数値又は文字列であるデバイスデータ毎に計数し、
     前記格納手段は、前記指定の動作モードにおいて前記頻度が高い順に前記デバイスデータを前記キャッシュに格納し、
     前記実行手段は、前記受付手段によって前記指示が受け付けられると、前記格納手段によって前記キャッシュに格納された前記デバイスデータを参照して前記指定の動作モードで前記プログラムを実行する、
     請求項1に記載のプログラム実行装置。
  3.  前記計数手段は、前記複数の動作モードそれぞれについて、前記頻度を該アクセスの対象である命令コード毎に計数し、
     前記格納手段は、前記指定の動作モードにおいて前記頻度が高い順に前記命令コードを前記キャッシュに格納し、
     前記実行手段は、前記受付手段によって前記指示が受け付けられると、前記格納手段によって前記キャッシュに格納された前記命令コードを参照して前記指定の動作モードで前記プログラムを実行する、
     請求項1又は2に記載のプログラム実行装置。
  4.  前記計数手段は、前記複数の動作モードそれぞれについて、前記頻度を該アクセスの対象であるファームウェア毎に計数し、
     前記格納手段は、前記指定の動作モードにおいて前記頻度が高い順に前記ファームウェアを前記キャッシュに格納し、
     前記実行手段は、前記受付手段によって前記指示が受け付けられると、前記格納手段によって前記キャッシュに格納された前記ファームウェアを参照して前記指定の動作モードで前記プログラムを実行する、
     請求項1から3のいずれか一項に記載のプログラム実行装置。
  5.  前記計数手段は、前記実行手段によって前記プログラムが前記複数の動作モードで実行されるときに発生する前記記憶装置へのアクセスの前記頻度を該アクセスの対象であるファームウェア毎に計数し、
     前記格納手段は、前記頻度が高い順に前記ファームウェアを前記キャッシュに格納し、
     前記実行手段は、前記受付手段によって前記指示が受け付けられると、前記格納手段によって前記キャッシュに格納された前記ファームウェアを参照して前記指定の動作モードで前記プログラムを実行する、
     請求項1から3のいずれか一項に記載のプログラム実行装置。
  6.  前記格納手段は、前記指定の動作モードにおいて、予め定められた個数まで前記データを前記キャッシュに格納する、
     請求項1から5のいずれか一項に記載のプログラム実行装置。
  7.  複数の動作モードを有するプログラムを実行するプログラム実行装置によるプログラム実行方法であって、
     前記複数の動作モードそれぞれについて、前記プログラムが実行されているときに発生する記憶装置へのアクセスの頻度を該アクセスの対象であるデータ毎に計数する計数ステップと、
     前記プログラムの動作モードの指定と、指定した動作モードで前記プログラムを実行することの指示と、を受け付ける受付ステップと、
     前記受付ステップにおいて受け付けられた指定の動作モードにおいて、前記計数ステップにおいて計数された前記頻度が高い順に前記データをキャッシュに格納する格納ステップと、
     前記受付ステップにおいて前記指示が受け付けられると、前記格納ステップにおいて前記キャッシュに格納された前記データを参照して前記指定の動作モードで前記プログラムを実行する実行ステップと、
     を含むプログラム実行方法。
  8.  複数の動作モードを有する実行プログラムを実行するコンピュータを、
     前記複数の動作モードそれぞれについて、前記プログラムが実行されているときに発生する記憶装置へのアクセスの頻度を該アクセスの対象であるデータ毎に計数する計数手段、
     前記プログラムの動作モードの指定と、指定した動作モードで前記プログラムを実行することの指示と、を受け付ける受付手段、
     前記受付手段によって受け付けられた指定の動作モードにおいて、前記計数手段によって計数された前記頻度が高い順に前記データをキャッシュに格納する格納手段、
     前記受付手段によって前記指示が受け付けられると、前記格納手段によって前記キャッシュに格納された前記データを参照して前記指定の動作モードで前記プログラムを実行する実行手段、
     として機能させるためのコンピュータプログラム。
PCT/JP2020/018467 2020-05-01 2020-05-01 プログラム実行装置、プログラム実行方法及びコンピュータプログラム WO2021220516A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2020/018467 WO2021220516A1 (ja) 2020-05-01 2020-05-01 プログラム実行装置、プログラム実行方法及びコンピュータプログラム
JP2020561840A JP6929474B1 (ja) 2020-05-01 2020-05-01 プログラム実行装置、プログラム実行方法及びコンピュータプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/018467 WO2021220516A1 (ja) 2020-05-01 2020-05-01 プログラム実行装置、プログラム実行方法及びコンピュータプログラム

Publications (1)

Publication Number Publication Date
WO2021220516A1 true WO2021220516A1 (ja) 2021-11-04

Family

ID=77456351

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/018467 WO2021220516A1 (ja) 2020-05-01 2020-05-01 プログラム実行装置、プログラム実行方法及びコンピュータプログラム

Country Status (2)

Country Link
JP (1) JP6929474B1 (ja)
WO (1) WO2021220516A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004192403A (ja) * 2002-12-12 2004-07-08 Fuji Xerox Co Ltd キャッシュメモリのデータ管理方法、及び情報処理装置
JP2006209527A (ja) * 2005-01-28 2006-08-10 Nokia Corp コンピュータシステム
JP2007207196A (ja) * 2006-02-06 2007-08-16 Seiko Instruments Inc プログラマブルロジックコントローラ、情報処理装置、制御プログラム、およびテーブル作成プログラム
JP2010128612A (ja) * 2008-11-25 2010-06-10 Panasonic Electric Works Co Ltd シーケンス制御システム

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6786010B2 (ja) * 2018-05-07 2020-11-18 三菱電機株式会社 情報処理装置、チューニング方法およびチューニングプログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004192403A (ja) * 2002-12-12 2004-07-08 Fuji Xerox Co Ltd キャッシュメモリのデータ管理方法、及び情報処理装置
JP2006209527A (ja) * 2005-01-28 2006-08-10 Nokia Corp コンピュータシステム
JP2007207196A (ja) * 2006-02-06 2007-08-16 Seiko Instruments Inc プログラマブルロジックコントローラ、情報処理装置、制御プログラム、およびテーブル作成プログラム
JP2010128612A (ja) * 2008-11-25 2010-06-10 Panasonic Electric Works Co Ltd シーケンス制御システム

Also Published As

Publication number Publication date
JPWO2021220516A1 (ja) 2021-11-04
JP6929474B1 (ja) 2021-09-01

Similar Documents

Publication Publication Date Title
WO2015136960A1 (ja) コントローラ
JP7000686B2 (ja) 制御装置
EP3622395A1 (en) Method of managing resource providing in a computers cluster running jobs
US10877803B2 (en) Control apparatus, control method and non-transitory storage medium
WO2021220516A1 (ja) プログラム実行装置、プログラム実行方法及びコンピュータプログラム
KR102280116B1 (ko) 엔지니어링 장치, 엔지니어링 장치의 제어 방법 및 프로그램
WO2016189709A1 (ja) コントローラ
JP6362821B2 (ja) 制御装置、制御方法および命令セット
JP2009157533A (ja) プログラマブルコントローラシステム
JP6135247B2 (ja) 情報処理装置および情報処理プログラム
JP2009080740A (ja) 無線機能付きプログラマブルコントローラおよびプログラマブルコントローラシステム
JP2005332370A (ja) 制御装置
JP6119452B2 (ja) プログラマブルコントローラシステム、その支援装置、プログラマブルコントローラ、プログラム
JP7276265B2 (ja) 生産システム、上位制御装置、制御装置、通信方法、及びプログラム
JP2007199869A (ja) デバイス連携機構の自動分散化プログラム、装置およびデバイス連携機構
TWI699105B (zh) 通信系統、通信裝置及電腦程式產品
JP2008226111A (ja) 2重化コントローラシステム、その稼動系コントローラ
KR102434126B1 (ko) Plc 프로그램 처리 장치
KR101805866B1 (ko) 소프트웨어 디파인드 라디오를 위한 전자 장치 및 그 스케줄링 방법
KR100502455B1 (ko) 프로그래머블 컨트롤러
JP2004280305A (ja) プログラマブルコントローラ用機器及びプログラマブルコントローラ並びにデータの受渡方法
JP6812727B2 (ja) 安全制御ユニット、安全制御方法、安全制御プログラム
KR20210101770A (ko) 복수 프로그래밍 언어 지원을 위한 plc 제어방법
KR100303307B1 (ko) 실시간 오퍼레이팅 시스템에서 디버깅동작을 위한 다운로드장치 및 방법
WO2018061537A1 (ja) 制御ユニット、データリフレッシュ方法、データリフレッシュプログラム

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2020561840

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 20933472

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20933472

Country of ref document: EP

Kind code of ref document: A1