WO2021095466A1 - 制御装置 - Google Patents

制御装置 Download PDF

Info

Publication number
WO2021095466A1
WO2021095466A1 PCT/JP2020/039564 JP2020039564W WO2021095466A1 WO 2021095466 A1 WO2021095466 A1 WO 2021095466A1 JP 2020039564 W JP2020039564 W JP 2020039564W WO 2021095466 A1 WO2021095466 A1 WO 2021095466A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing unit
control
variable
program
command value
Prior art date
Application number
PCT/JP2020/039564
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 EP20887884.3A priority Critical patent/EP4036670A4/en
Priority to CN202080073707.9A priority patent/CN114585979A/zh
Priority to US17/771,449 priority patent/US20220397880A1/en
Publication of WO2021095466A1 publication Critical patent/WO2021095466A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • B25J9/1682Dual arm manipulator; Coordination of several manipulators
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13069Execute bit operation during instruction fetch cycle for word operation
    • 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/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23328Modification program
    • 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/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25174Ethernet
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the present invention relates to a control device for controlling a plurality of control targets.
  • FA Vectory Automation
  • a control device such as a PLC (programmable controller)
  • PLC programmable controller
  • Such a control device not only directly controls the control target, but may also indirectly control the control target by giving a control command to another device.
  • Patent Document 2 discloses a technique for realizing a control operation according to a plurality of types of programs having different execution formats with a single control device.
  • a command value operation is performed for a program in which the entire program is executed for each control cycle and a program in which the entire program is executed sequentially according to an intermediate code generated by some interpretations.
  • a configuration is adopted in which each command value is output together for each control cycle.
  • variable exchange has not been fully examined. That is, in the prior art, when variables for control operations are shared by different types of programs, how to share them has not been sufficiently examined. Therefore, even when different control targets are performed by a single control device, the load of program generation by the user is not sufficiently reduced.
  • the present invention has been made in view of such a problem, and even when a control operation according to a plurality of types of programs having different execution formats is performed by a single control device, the load of program generation by the user is increased.
  • the purpose is to provide technology that can be mitigated.
  • the present invention is a control device having a program according to a first execution format in which the whole is executed for each execution and a program according to a second execution format which is sequentially executed.
  • a first processing unit configured to be able to calculate a first command value for controlling a first control target by executing a program according to the first execution format for each predetermined control cycle.
  • one of the first processing unit and the second processing unit can be used in both the calculation by the first processing unit and the calculation by the second processing unit.
  • a variable is held, and the other processing unit of the first processing unit and the second processing unit is configured to be accessible to the predetermined variable via the one processing unit.
  • the above control device has a program according to the first execution format and a program according to the second execution format, which are programs having different types of execution formats.
  • the former execution format is a format in which the entire program is executed for each execution, and the latter execution format is a sequential execution format.
  • the first processing unit executes a program according to the first execution format for each control cycle and calculates the first command value based on the program.
  • the second processing unit is configured to calculate a second command value based on the program according to the second execution format for each control cycle according to the intermediate code generated through the interpretation of the interpreter. Then, by outputting the first command value and the second command value by the output unit, it is possible to synchronously output each command value based on the programs of different execution formats.
  • one of the first processing unit and the second processing unit is used in both the calculation by the first processing unit and the calculation by the second processing unit. It is configured to hold a given variable. That is, although the predetermined variables are used by both processing units, only one processing unit holds them. On top of that, the first processing unit and the other processing unit of the second processing unit, which do not hold the predetermined variable, hold the predetermined variable when the predetermined variable is required for its own calculation. The predetermined variable is accessed through one of the processing units. As a result, the other processing unit can also realize its own calculation using the predetermined variable.
  • the user since the first processing unit and the second processing unit are formed by a single control device, the user prepares a program for controlling the exchange of data between the first processing unit and the second processing unit. There is no need to do this, and the load on the user can be reduced.
  • the one processing unit may be the first processing unit, and the other processing unit may be the second processing unit.
  • the one processing unit may be the second processing unit, and the other processing unit may be the first processing unit.
  • the predetermined variable may be set to the same variable name in the operation by the one processing unit and the operation by the other processing unit.
  • the other processing unit uses the value of the variable having the same variable name as the predetermined variable in the one processing unit as the value of the predetermined variable. You may use it. That is, for a predetermined variable, by making the variable name the same between one processing unit and the other processing unit, the predetermined variable is exchanged between the two processing units using the variable name.
  • the first variable name of the predetermined variable in the calculation by the one processing unit and the second variable name of the predetermined variable in the calculation by the other processing unit are different.
  • Correlation information that defines the correlation between the first variable name and the second variable name may be retained.
  • the other processing unit is associated with the second variable name based on the correlation information.
  • the value of the variable of the variable name may be used as the value of the predetermined variable.
  • the correlation information regarding the variable name is held in the control device, and the predetermined variable between the two processing units is held based on the correlation information. Is exchanged.
  • FIG. 1 is a diagram showing a schematic configuration of a control system including an integrated controller.
  • FIG. 2 is a functional block diagram that visualizes the functions of the integrated controller.
  • FIG. 3 is a diagram showing the correlation between the variables used in the robot control executed by the integrated controller and the variables used in the PLC control.
  • FIG. 4 is a diagram showing a flow of processing executed by the integrated controller according to the control cycle.
  • FIG. 5 is a first flowchart relating to robot control executed by the integrated controller.
  • FIG. 6 is a second flowchart relating to robot control executed by the integrated controller.
  • FIG. 1 is a schematic configuration diagram of a control system 1 to which the control device 100 is applied
  • FIG. 2 is an image of a functional unit formed in the control device 100.
  • the control device 100 corresponds to an industrial controller that controls a control target of various equipments and devices.
  • the control device 100 is a kind of computer that executes a control calculation as described later.
  • the control device 100 may be connected to various field devices via the field network 2.
  • Field equipment includes actuators that give some physical action to manufacturing equipment, production lines, etc. (hereinafter, also collectively referred to as "fields"), and input / output devices that exchange information with and from fields.
  • a robot 210, a servo driver 220, and a motor 222 are exemplified as field devices.
  • the servo driver 220 drives the motor 222 according to a command value (for example, a position command, a speed command, etc.) from the control device 100.
  • a command value for example, a position command, a speed command, etc.
  • examples of the robot 210 include a parallel robot, a SCARA robot, and an articulated robot.
  • the control device 100 is a control device configured to be able to integrally control the robot 210, the servo driver 220, and the motor 222, and the details thereof will be described later.
  • the control device 100 exchanges data with one or a plurality of field devices via the field network 2 or the like.
  • the "field network” is also referred to as a "field bus", but for the sake of simplicity of description, the term “field network” is collectively referred to in the present application.
  • the control device 100 collects data (hereinafter, also referred to as “input data”) collected or generated in various field devices (hereinafter, also referred to as “input data”), data such as a command to the field device (hereinafter, “output data”). (Also referred to as)) is generated (arithmetic processing), and the generated output data is transmitted to the target field device (output processing).
  • the field network 2 adopts a bus or network that performs constant periodic communication in which the arrival time of data is guaranteed.
  • EtherCAT registered trademark
  • the data exchanged between the control device 100 and the field device via the field network 2 is updated in a very short cycle of several hundred ⁇ sec order to several tens of msec order.
  • the data update process exchanged in this way is also referred to as an input / output refresh process.
  • the control device 100 is also connected to other devices via the upper network 6.
  • general network protocols such as Ethernet (registered trademark) and EtherNet / IP (registered trademark) may be adopted.
  • one or more server devices 10 may be connected to the upper network 6.
  • MES Manufacturing Execution System
  • the manufacturing execution system acquires information from the manufacturing equipment or equipment to be controlled, monitors and manages the entire production, and can also handle order information, quality information, shipping information, and the like.
  • a device that provides an information system service may be connected to the upper network 6.
  • the control device 100 is a kind of computer that executes a predetermined control calculation as described above, and includes a processor and a memory necessary for the control calculation.
  • the processor is composed of a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a GPU (Graphics Processing Unit), and the like.
  • As the processor a configuration having a plurality of cores may be adopted, or a plurality of the processors may be arranged.
  • the memory includes a volatile storage device such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory), and a non-volatile storage device such as HDD (Hard Disk Drive) and SSD (Solid State Drive). Will be done.
  • the processor reads and executes various programs stored in the memory to realize control according to the control target and various processes as described later.
  • the memory stores user programs (IEC program 51 and application program 52) created according to the manufacturing equipment and equipment to be controlled.
  • the IEC program 51 in the present application is a program in which the entire program is scanned for each execution and one or a plurality of command values are calculated for each execution.
  • the International Electrotechnical Commission International Electrotechnical Commission: Includes a program consisting of one or more instructions written in accordance with the international standard IEC61131-3 defined by IEC).
  • the IEC program 51 includes sequence control and motion control instructions.
  • Such an IEC program 51 corresponds to an execution format in which all programs are executed (scanned) in each control cycle, and is suitable for control that requires immediacy and high speed.
  • the application program 52 in the present application is a control program for performing a specific machining or operation using a robot, and includes a program consisting of one or a plurality of instructions for realizing a control application by the robot, and IEC. Distinguished from program 51.
  • the application program 52 related to robot control adopts an interpreter method in which the application program 52 is described using a robot language and is sequentially executed line by line.
  • the control device 100 has a control application processing unit 30, an IEC program processing unit 40, an upper network interface 20, and a lower network interface 60.
  • the lower network interface 60 mediates the exchange of data between the IEC program processing unit 40 and the control application processing unit 30 and the field equipment connected via the field network 2.
  • the upper network interface 20 mediates the exchange of data between the IEC program processing unit 40 and the control application processing unit 30 and the server device 10 connected via the upper network 6.
  • the control device 100 receives an instruction such as start / end of production from the server device 10 connected via the upper network 6.
  • the server device 10 may transmit an application program for operating the control application, recipe information (information such as parameters suitable for production), and the like to the control device 100.
  • the IEC program processing unit 40 executes (scans) the IEC program 51 at predetermined control cycles to calculate one or a plurality of command values. That is, the IEC program processing unit 40 calculates the command value for each control cycle according to the IEC program 51.
  • the IEC program 51 is executed in order to control a predetermined device including the motor 222.
  • the motion processing unit 42 provides a function of calculating a command value for each control cycle according to a motion command included in the IEC program 51. That is, the motion command included in the IEC program 51 includes a command for instructing the behavior over a plurality of control cycles (for example, a command for the output of a predetermined device composed of the motor 222 to draw some trajectory).
  • the motion processing unit 42 calculates a command value for each control cycle according to the instruction content of the executed motion command. That is, the motion processing unit 42 realizes the behavior instructed by the motion command by outputting the command value to the predetermined device for each control cycle.
  • the IEC program processing unit 40 has a shared memory 41.
  • the shared memory 41 holds data (variable data) related to a predetermined variable used for arithmetic processing of a command value by the motion processing unit 42. Therefore, the IEC program processing unit 40 accesses the shared memory 41 in a timely manner when calculating the command value for controlling the behavior of the predetermined device.
  • the variable data stored in the shared memory 41 is configured to be accessible from the control application processing unit 30 described later, and the details thereof will be described later. Further, the shared memory 41 may store data other than the variable data for the command value calculation described above.
  • a part or all of the processing result by the IEC program processing unit 40 is stored in the shared memory 41, and the control application processing unit 30 refers to the data stored in the shared memory 41 of the IEC program processing unit 40. can do. Further, it may be possible to write data from the control application processing unit 30 to the shared memory 41 of the IEC program processing unit 40, and the data written from the control application processing unit 30 in this way is transmitted from the motion processing unit 42. It can be referred to.
  • control application processing unit 30 calculates a command value for controlling the control application based on the application program 52, recipe information, and the like.
  • the control application processing unit 30 calculates and outputs a command value for the control application in synchronization with the calculation and output of the command value by the IEC program processing unit 40. That is, the control application processing unit 30 executes the calculation processing of the command value for controlling the robot 210 in synchronization with the calculation processing by the IEC program processing unit 40.
  • the synchronous processing between the IEC program processing unit 40 and the control application processing unit 30 will be described later.
  • the control application processing unit 30 includes a motion processing unit 32, a buffer 33, and an interpreter 34 in order to realize a command value calculation synchronized with the command value calculation processing by the IEC program processing unit 40.
  • the interpreter 34 has a buffer 33 that interprets at least a part of the sequential application program 52 to generate an intermediate code and stores the generated intermediate code.
  • the intermediate code in the present application is a concept including instructions for calculating a command value for each control cycle, and may include one or more instructions, or one or more functions.
  • the motion processing unit 32 calculates the command value for each control cycle according to the intermediate code generated in advance by the interpreter 34 and stored in the buffer 33.
  • the processing unit 32 can calculate the command value for each control cycle.
  • the coordinate system corresponding to each control application may be used for the instruction described in the intermediate code.
  • control application processing unit 30 is configured to be able to access the shared memory 41 in a timely manner for the calculation processing of the command value for the control of the robot 210 by the motion processing unit 32, if necessary. For example, when it is necessary to determine the movement of the robot 210 in accordance with the movement of the predetermined device when the predetermined device including the motor 222 and the robot 210 are synchronously controlled, the operation by the motion processing unit 32 is performed. In the processing, it is necessary to use the variable data which is a variable related to the predetermined device and is held in the shared memory 41. In such a case, the control application processing unit 30 accesses the shared memory 41 via the IEC program processing unit 40 and acquires the variable data.
  • variable name used in the command value calculation by the IEC program processing unit 40 and the variable name used in the command value calculation by the control application processing unit 30 are set to be the same.
  • the control application processing unit 30 processes the IEC program so that the control application processing unit 30 returns the value of the variable having the same name as the variable included in the application program 52 when the motion processing unit 32 performs the arithmetic processing.
  • Query processing is performed on the unit 40.
  • the inquired IEC program processing unit 40 returns the variable data of the variable to the control application processing unit 30.
  • the arithmetic processing by the motion processing unit 32 is continued. If the variable having the same name is not held in the shared memory 41, the IEC program processing unit 40 returns an error signal to the control application processing unit 30.
  • variable name used in the command value calculation by the IEC program processing unit 40 and the variable name used in the command value calculation by the control application processing unit 30 are set with different variable names. ..
  • a table that defines the correlation between the variable name on the IEC program processing unit 40 side and the variable name on the control application processing unit 30 side is held in the control application processing unit 30.
  • the control application processing unit 30 to the IEC program processing unit 40 so as to identify the variable (“variable on the IEC program processing unit side” in FIG. 3) and return the value of the specified variable. Query processing is performed. The response after the inquiry is the same as in the first form.
  • ⁇ Synchronous execution of programs> In the control device 100, synchronous execution of the IEC program 51 and the application program 52 is realized.
  • the interpreter 34 of the control application processing unit 30 sequentially executes the application program 52 at a cycle longer than the control cycle, for example, at a cycle equal to twice the control cycle.
  • the motion processing unit 42 of the IEC program processing unit 40 and the motion processing unit 32 of the control application processing unit 30 both calculate command values for the same control cycle. Therefore, the output of the command value from the control device 100 is performed synchronously in a predetermined control cycle.
  • the IEC program processing unit 40 and the control application processing unit 30 each have a motion processing unit for continuously controlling the movement of the actuator, and these motion processing units synchronously output command values. By performing the calculation, both the control according to the IEC program 51 and the control according to the application program 52 can be executed in synchronization with the control cycle, whereby precise control in the control cycle unit is realized.
  • FIG. 4 is a diagram showing an example of program execution timing in the control device 100.
  • a high-priority task (upper process in FIG. 4) and a low-priority task (lower process in FIG. 4) have a high priority.
  • the execution of the interpreter 34 of the unit 30 is set as a low priority task.
  • the command value calculation process B32 to be performed is executed as a high priority task.
  • the process B34 that sequentially interprets the application program 52 is executed as a low priority task.
  • the high priority task is repeatedly executed every predetermined control cycle T1.
  • the low priority task is executed each time the high priority task is not executed within each control cycle. That is, the execution time of the high-priority task is assigned to each control cycle, and the low-priority task is executed at a time other than the execution time of the high-priority task.
  • the high priority task will be described.
  • the input / output refresh process B60 is executed, and then the entire IEC program 51 is executed (scanned) by the IEC program processing unit 40, and the sequence control is performed.
  • One or more command values of (execution process B40) are calculated.
  • the motion processing unit 42 executes the motion processing related to the motion instruction included in the IEC program 51, and calculates one or a plurality of command values for the motion instruction (execution processing B42).
  • the motion processing unit 32 of the control application processing unit 30 prepares a motion command for controlling the robot 210 according to the intermediate code stored in the buffer 33 (execution process B32).
  • the same processing is repeated for each control cycle.
  • the timing at which the motion processing unit 32 reads the intermediate code from the buffer 33 does not have to be each control cycle. This is because when the read intermediate code includes an instruction capable of calculating a command value over a plurality of control cycles T1, the intermediate code can be read at once in the plurality of control cycles T1.
  • the command value for the sequence control related to the motor 222 and the like, the command value for the motion control thereof, and the command value for the control application related to the robot 210 are set. Be prepared. These command values are basically reflected on the field side when the next control cycle arrives. That is, since the IEC program processing unit 40 and the control application processing unit 30 calculate the command value according to the input data in the same control cycle, it is possible to realize an output synchronized with the input.
  • the interpreter 34 of the control application processing unit 30 sequentially executes the application program 52. That is, the interpreter 34 executes the reading and analysis of the application program 52 with low priority.
  • the intermediate code generated by the interpreter 34 analyzing the application program 52 is sequentially stored in the buffer 33 while considering the capacity of the buffer 33.
  • the intermediate code stored in the buffer 33 is sequentially referred to by the motion processing unit 32 of the control application processing unit 30, and is used for generating the command value in the arithmetic processing B32.
  • the interpreter 34 generates an extra intermediate code for an integral multiple of the control cycle, which is the calculation cycle of the high priority task, in advance so as not to affect the processing by the motion processing unit 32.
  • the command value for the control application can be calculated for each control cycle.
  • the interpreter 34 suspends the interpretation of the application program 52 before the predetermined control application synchronization cycle (integer multiple of the control cycle) arrives.
  • the interpreter 34 updates the data shared with the IEC program processing unit 40 every synchronization cycle.
  • the input data and the output data acquired from the field side may also be updated (data synchronization).
  • the control application processing unit 30 can also control the robot 210 by using the data acquired by the IEC program processing unit 40.
  • the control application synchronization cycle may have any length as long as it is set to an integral multiple of the control cycle. It is appropriately set according to the control accuracy required in the control application.
  • FIG. 5 is a flowchart relating to the processing of the high priority task described above
  • FIG. 6 is a flowchart relating to the processing of the low priority task described above.
  • the lower network interface 60 executes the input / output refresh process (process of S101).
  • the command value (command value by B40, B42, B32, etc.) calculated in the immediately preceding control cycle T1 is output to the actuator or the like of the field device, and the input data from the field device is acquired.
  • S102 it is determined whether or not the current control cycle coincides with the timing of data synchronization. If an affirmative determination is made there, data synchronization is executed between the IEC program processing unit 40 and the control application processing unit 30 (processing of S103). If a negative determination is made in S102, the process proceeds to S104.
  • the above-mentioned execution process B40 is performed, and then in S105, the above-mentioned execution process B42 is performed.
  • the above-mentioned robot execution process B32 for preparing a motion command for controlling the robot 210 is performed. Then, when the robot execution process B32 is performed, if a predetermined variable is included in the application program 52, it is held in the shared memory 41 according to the first form or the second form described above. , The value of the corresponding variable is used.
  • the command value calculated and prepared by the series of processing of the high priority task shown in FIG. 5 is output to the field when the next control cycle T1 arrives. Then, the low priority task shown in FIG. 6 is executed in the period after the end of the series of processes until the next control cycle T1 arrives.
  • the processing flow of the low priority task relates to the interpretation processing of the application program 52 by the interpreter 34.
  • the control application processing unit 30 determines whether or not the intermediate code remains in the buffer 33. The determination is made so as not to generate an intermediate code exceeding the capacity of the buffer 33. If the affirmative judgment is made in S201, the low priority task ends, and if the negative judgment is made, the process proceeds to S202.
  • S202 a part of the application program 52 is read by the interpreter 34. For example, one line of code constituting the application program 52 is read.
  • S203 the code read by the interpreter 34 is interpreted and an intermediate code is generated. The generated intermediate code is stored in the buffer 33 in S204.
  • the IEC program 51 and the application program 52 are executed in the control device 100 at the execution timing shown in FIG.
  • a control device (100) having a program (51) according to a first execution format in which the whole is executed for each execution, and a program (52) according to a second execution format that is executed sequentially.
  • the program (51) according to the first execution format is executed for each predetermined control cycle, and the first command value for controlling the first control target (222) can be calculated.
  • First processing unit (40) and The second control target (210) is executed for each control cycle according to the intermediate code generated by executing the program (52) according to the second execution format and interpreting at least a part of the program by the interpreter (34).
  • a second processing unit (30) configured to be able to calculate a second command value for controlling), and An output unit (60) that outputs the first command value and the second command value for each control cycle, and With Either one of the first processing unit (40) and the second processing unit (30) performs both the calculation by the first processing unit (40) and the calculation by the second processing unit (30). Holds a predetermined variable that can be used in the above, and the other processing unit of the first processing unit (40) and the second processing unit (30) can access the predetermined variable via the one processing unit. Composed, Control device.

Abstract

制御装置は、第1処理部と、第2処理部を備え、第1処理部と第2処理部のうちいずれか一方の処理部が、該第1処理部による演算と該第2処理部による演算の両方において使用可能な所定変数を保持し、該第1処理部と該第2処理部のうち他方の処理部は、該一方の処理部を介して該所定変数にアクセス可能に構成される。

Description

制御装置
 本発明は、複数の制御対象を制御するための制御装置に関する。
 様々な生産現場において、PLC(プログラマブルコントローラ)などの制御装置を用いたFA(Factory Automation)技術が広く普及している。このような制御装置は、直接的に制御対象を制御するだけではなく、他の装置に制御指令を与えることで、間接的に制御対象を制御する場合もある。また、これまで複数の専用装置を用いて実現されていた制御システムを、より少ない数の制御装置に統合したいというニーズも生じている。例えば、特許文献1に示す技術では、PLCのCPUユニットにおいて、モーション演算プログラムおよびユーザプログラムが同期して実行される。
 また、特許文献2では、実行形式の異なる複数種類のプログラムに従う制御演算を単一の制御装置で実現する技術が開示されている。当該技術では、例えば、制御周期毎にプログラム全体が実行される形式のプログラムと、一部の解釈により生成される中間コードに従って逐次実行される形式のプログラムとに関して、それぞれの指令値演算を行い、制御周期毎に各指令値を併せて出力する構成が採用されている。
特開2012-194662号公報 特開2019-36043号公報
 複数の制御対象を制御するために、実行形式の異なる複数種類のプログラムに従う制御演算が行われる場合、それぞれの制御演算で使用される変数は、当該制御演算に応じて適宜設定されるのが一般的である。したがって、それぞれの制御演算が、異なる制御装置で行われる場合には、一方の制御装置による制御演算において、他方の制御装置が使用する変数にアクセスする必要があるときは、異なる制御装置間において当該変数にアクセスするための通信処理を行う必要がある。その結果、ユーザは、複数の制御対象を同時に制御するためには、各制御対象を制御するための制御演算を実行するプログラムを、その種類に従って作成する必要があるとともに、両プログラム(両制御装置)間での変数(データ)の通信に関する処理プログラムを作成する必要があった。
 また、複数の制御対象を制御するために、実行形式の異なる複数種類のプログラムに従う制御演算が単一の制御装置で行われる場合であっても、種類の異なるプログラム間での演算処理のための変数のやり取りについて、具体的な構成は十分に検討されていない。すなわち、従来技術においては、異なる種類のプログラムにおいて制御演算のための変数を共有する場合、どのように共有すべきかについては十分な検討が為されていない。そのため、異なる制御対象を単一の制御装置で行う場合であっても、ユーザによるプログラム生成の負荷は十分に軽減されていない。
 本発明は、このような問題に鑑みてなされたものであり、実行形式の異なる複数種類のプログラムに従う制御演算が単一の制御装置で行われる場合であっても、ユーザのプログラム生成の負荷を軽減し得る技術を提供することを目的とする。
 本発明においては、上記課題を解決するために、実行形式の異なる複数種類のプログラムの実行を単一の制御装置で可能とした上で、それぞれのプログラムで使用可能な変数を一方のプログラム側で保持し、他方のプログラムはその一方のプログラムを介して当該変数にアクセスする構成を採用した。当該構成の採用により、ユーザによる当該変数の管理が容易となり、ユーザのプログラム生成の負荷が軽減される。
 具体的に、本発明は、実行毎に全体が実行される第1の実行形式に従ったプログラムと、逐次実行される第2の実行形式に従ったプログラムと、を有する制御装置であって、予め定められた制御周期毎に前記第1の実行形式に従ったプログラムを実行して第1の制御対象を制御するための第1の指令値を演算可能に構成された第1処理部と、前記第2の実行形式に従ったプログラムを実行してインタプリタにより該プログラムの少なくとも一部が解釈されて生成される中間コードに従って前記制御周期毎に第2の制御対象を制御するための第2の指令値を演算可能に構成された第2処理部と、前記第1の指令値および前記第2の指令値を前記制御周期毎に出力する出力部と、を備える。そして、当該制御装置において、前記第1処理部と前記第2処理部のうちいずれか一方の処理部が、該第1処理部による演算と該第2処理部による演算の両方において使用可能な所定変数を保持し、該第1処理部と該第2処理部のうち他方の処理部は、該一方の処理部を介して該所定変数にアクセス可能に構成される。
 上記の制御装置は、実行形式の種類が異なるプログラムである、第1の実行形式に従ったプログラムと第2の実行形式に従ったプログラムを有している。前者の実行形式は、その実行毎にプログラム全体が実行される形式であり、後者の実行形式は逐次実行の形式である。このように異なる実行形式のプログラムが利用可能となることで、ユーザは、制御対象の制御に適したプログラムを適宜選択でき制御装置の利便性が高められる。
 そして、第1処理部が、制御周期毎に第1の実行形式に従ったプログラムを実行しそれに基づく第1の指令値を演算する。また、第2処理部は、インタプリタの解釈を経て生成される中間コードに従って制御周期毎に第2の実行形式に従ったプログラムに基づく第2の指令値を演算するように構成される。そして、出力部により第1の指令値と第2の指令値とが出力されることで、異なる実行形式のプログラムに基づいた各指令値を同期して出力することができる。
 このように構成される制御装置において、第1処理部と第2処理部のうちいずれか一方の処理部が、該第1処理部による演算と該第2処理部による演算の両方において使用される所定変数を保持するように構成される。すなわち、所定変数については両処理部が使用するものでありながら、一方の処理部のみが保持している。その上で、所定変数を保持していない、第1処理部と該第2処理部のうち他方の処理部は、自己の演算に当該所定変数が必要な場合には、当該所定変数を保持している一方の処理部を介して、当該所定変数にアクセスする。この結果、他方の処理部も、当該所定変数を使用して自己の演算を実現できる。このとき、第1処理部と第2処理部は、単一の制御装置において形成されているため、ユーザは第1処理部と第2処理部との間のデータのやり取りを制御するプログラムを準備する必要は無く、ユーザの負荷軽減が図られる。
 ここで、一例として、前記一方の処理部は前記第1処理部であり、前記他方の処理部は前記第2処理部であってもよい。また別法として、前記一方の処理部は前記第2処理部であり、前記他方の処理部は前記第1処理部であってもよい。
 また、上述までの制御装置において、前記所定変数は、前記一方の処理部による演算と前記他方の処理部による演算とにおいて、同一の変数名に設定されてもよい。この場合、前記他方の処理部によって前記所定変数を使用するとき、該他方の処理部は、前記一方の処理部において該所定変数と同一の変数名を有する変数の値を該所定変数の値として使用してもよい。すなわち、所定変数について、一方の処理部と他方の処理部とで変数名を同一にすることで、その変数名を利用して両処理部間の所定変数のやり取りが行われる。
 また、別法として、上述までの制御装置において、前記一方の処理部による演算における前記所定変数の第1変数名と、前記他方の処理部による演算における前記所定変数の第2変数名とは異なり、前記第1変数名と前記第2変数名との相関を画定する相関情報が保持されてもよい。この場合、前記他方の処理部によって前記所定変数として前記第2変数名の変数を使用するとき、該他方の処理部は、前記相関情報に基づいて該第2変数名に関連付けられた前記第1変数名の変数の値を該所定変数の値として使用してもよい。すなわち、所定変数について、一方の処理部と他方の処理部とで変数名は異なるものの変数名に関する相関情報が制御装置に保持されることで、その相関情報に基づいて両処理部間の所定変数のやり取りが行われる。
 実行形式の異なる複数種類のプログラムに従う制御演算が単一の制御装置で行われる場合であっても、ユーザのプログラム生成の負荷を軽減し得る。
図1は、統合コントローラを含む制御システムの概略構成を示す図である。 図2は、統合コントローラの機能をイメージ化した機能ブロック図である。 図3は、統合コントローラで実行されるロボット制御において使用される変数とPLC制御において使用される変数の相関を示す図である。 図4は、統合コントローラで制御周期に従って実行される処理の流れを示す図である。 図5は、統合コントローラで実行されるロボット制御に関する第1のフローチャートである。 図6は、統合コントローラで実行されるロボット制御に関する第2のフローチャートである。
<適用例>
 実施形態に係る制御装置の適用例について、図1及び図2に基づいて説明する。図1は、当該制御装置100が適用される制御システム1の概略構成図であり、図2は、制御装置100に形成される機能部をイメージ化した図である。
 制御装置100は、各種の設備や装置などの制御対象を制御する産業用コントローラに相当する。制御装置100は、後述するような制御演算を実行する一種のコンピュータである。制御装置100は、フィールドネットワーク2を介して各種のフィールド機器と接続されてもよい。フィールド機器は、製造装置や生産ラインなど(以下、「フィールド」とも総称する。)に対して何らかの物理的な作用を与えるアクチュエータ、および、フィールドとの間で情報をやり取りする入出力装置などを含み、図1においては、フィールド機器として、ロボット210や、サーボドライバ220及びモータ222が例示されている。サーボドライバ220は、制御装置100からの指令値(例えば、位置指令や速度指令など)に従って、モータ222を駆動する。また、ロボット210としては、パラレルロボット、スカラロボット、多関節ロボットが例示できる。このように制御装置100は、ロボット210やサーボドライバ220及びモータ222を統合的に制御し得るように構成された制御装置であり、その詳細については後述する。
 制御装置100は、フィールドネットワーク2などを介して、1または複数のフィールド機器との間でデータをやり取りする。一般的に「フィールドネットワーク」は、「フィールドバス」とも称されるが、説明の簡素化のため、本願においては、「フィールドネットワーク」と総称する。制御装置100は、各種のフィールド機器において収集または生成されたデータ(以下、「入力データ」とも称す。)を収集する処理(入力処理)、フィールド機器に対する指令などのデータ(以下、「出力データ」とも称す。)を生成する処理(演算処理)、生成した出力データを対象のフィールド機器へ送信する処理(出力処理)等を行う。
 ここで、フィールドネットワーク2は、データの到達時間が保証される、定周期通信を行うバスまたはネットワークを採用することが好ましい。このような定周期通信を行うバスまたはネットワークとしては、EtherCAT(登録商標)等が知られている。そして、フィールドネットワーク2を介して、制御装置100とフィールド機器との間でやり取りされるデータは、数100μsecオーダ~数10msecオーダのごく短い周期で更新されることになる。なお、このようなやり取りされるデータの更新処理は、入出力リフレッシュ処理とも称される。
 また、制御装置100は、上位ネットワーク6を介して、他の装置にも接続されている。上位ネットワーク6には、一般的なネットワークプロトコルであるイーサネット(登録商標)やEtherNet/IP(登録商標)が採用されてもよい。より具体的には、上位ネットワーク6には、1または複数のサーバ装置10が接続されてもよい。サーバ装置10としては、データベースシステム、製造実行システム(MES:Manufacturing Execution System)などが想定される。製造実行システムは、制御対象の製造装置や設備からの情報を取得して、生産全体を監視および管理するものであり、オーダ情報、品質情報、出荷情報などを扱うこともできる。これに限らず、情報系サービスを提供する装置を上位ネットワーク6に接続するようにしてもよい。
 ここで、図2に基づいて、制御装置100の構成について説明する。制御装置100は、上記の通り所定の制御演算を実行する一種のコンピュータであり、当該制御演算に必要なプロセッサやメモリを備えている。当該プロセッサは、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、GPU(Graphics Processing Unit)などで構成される。プロセッサとしては、複数のコアを有する構成を採用してもよいし、当該プロセッサを複数配置してもよい。当該メモリとしては、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置や、HDD(Hard Disk Drive)やSSD(Solid State Drive)などの不揮発性記憶装置などで構成される。そして、プロセッサは、メモリに格納された各種プログラムを読出して実行することで、制御対象に応じた制御、および、後述するような各種処理を実現する。メモリには、基本的な機能を実現するためのシステムプログラムに加えて、制御対象の製造装置や設備に応じて作成されるユーザプログラム(IECプログラム51およびアプリケーションプログラム52)が格納される。
 なお、本願におけるIECプログラム51とは、実行毎に全体がスキャンされて、実行毎に1または複数の指令値が演算されるプログラムであり、典型的には、国際電気標準会議(International Electrotechnical Commission:IEC)によって規定された国際規格IEC61131-3に従って記述された1または複数の命令からなるプログラムを包含する。IECプログラム51には、シーケンス制御およびモーション制御の命令が含まれる。このようなIECプログラム51は、制御周期毎にすべてのプログラムが実行(スキャン)される実行形式に対応するものであり、即時性および高速性が要求される制御に好適である。一方で、本願におけるアプリケーションプログラム52は、ロボットを用いて特定の加工や動作を行うための制御プログラムであり、ロボットによる制御アプリケーションを実現するための1または複数の命令からなるプログラムを包含し、IECプログラム51とは区別される。ロボット制御に関するアプリケーションプログラム52は、一例として、ロボット言語を用いて記述され、1行ずつ逐次実行されるインタプリタ方式が採用される。
 そして、図2に示すように、制御装置100は、制御アプリケーション処理部30と、IECプログラム処理部40と、上位ネットワークインターフェイス20と、下位ネットワークインターフェイス60と、を有する。下位ネットワークインターフェイス60は、IECプログラム処理部40および制御アプリケーション処理部30と、フィールドネットワーク2を介して接続されているフィールド機器との間のデータのやり取りを仲介する。上位ネットワークインターフェイス20は、IECプログラム処理部40および制御アプリケーション処理部30と、上位ネットワーク6を介して接続されているサーバ装置10との間のデータのやり取りを仲介する。例えば、制御装置100は、上位ネットワーク6を介して接続されているサーバ装置10から、生産の開始/終了といった指示を受ける。サーバ装置10は、制御アプリケーションを動作させるためのアプリケーションプログラムおよびレシピ情報(生産に適したパラメータなどの情報)などを制御装置100に送信することもある。
 IECプログラム処理部40は、予め定められた制御周期毎にIECプログラム51を実行(スキャン)して1または複数の指令値を演算する。すなわち、IECプログラム処理部40は、IECプログラム51に従って、制御周期毎に指令値を演算する。なお、本願では、モータ222を含んで構成される所定の装置を制御するためにIECプログラム51の実行が行われるものとする。そして、モーション処理部42は、IECプログラム51に含まれるモーション命令に従って、制御周期毎に指令値を演算する機能を提供する。すなわち、IECプログラム51に含まれるモーション命令は、複数の制御周期に亘る挙動を指示する命令(例えば、モータ222で構成される所定の装置の出力が何らかの軌道を描くための命令)を含む。このようなモーション命令が実行されると、実行されたモーション命令の指示内容に従って、モーション処理部42が制御周期毎に指令値を演算する。すなわち、モーション処理部42は、上記の所定の装置に対して制御周期毎に指令値を出力することで、モーション命令により指示された挙動を実現する。
 また、IECプログラム処理部40は、共有メモリ41を有している。共有メモリ41は、モーション処理部42による指令値の演算処理に使用される所定の変数に関するデータ(変数データ)を保持している。したがって、IECプログラム処理部40は、所定の装置の挙動を制御するための指令値演算に際して、適時、共有メモリ41へのアクセスを行う。また、この共有メモリ41に保持されている変数データは、後述する制御アプリケーション処理部30からもアクセス可能に構成されており、その詳細については後述する。また、共有メモリ41には、上述した指令値演算のための変数データ以外のデータが格納されてもよい。例えば、本願開示では、IECプログラム処理部40による処理結果の一部または全部が共有メモリ41に格納され、制御アプリケーション処理部30は、IECプログラム処理部40の共有メモリ41に格納されたデータを参照することができる。また、制御アプリケーション処理部30からIECプログラム処理部40の共有メモリ41へのデータ書込みも可能であってもよく、このように制御アプリケーション処理部30から書込まれたデータは、モーション処理部42から参照可能とされる。
 次に、制御アプリケーション処理部30は、アプリケーションプログラム52およびレシピ情報などに基づいて、制御アプリケーションを制御するための指令値を演算する。なお、本願では、ロボット210を制御するためにアプリケーションプログラム52が制御アプリケーション処理部30によって実行されるものとする。制御アプリケーション処理部30は、IECプログラム処理部40による指令値の演算および出力と同期して、制御アプリケーション用の指令値を演算および出力する。すなわち、制御アプリケーション処理部30は、IECプログラム処理部40による演算処理と同期して、ロボット210を制御するための指令値の演算処理を実行する。なお、このIECプログラム処理部40と制御アプリケーション処理部30の同期処理については、後述する。IECプログラム処理部40による指令値の演算処理と同期した指令値の演算を実現するために、制御アプリケーション処理部30は、モーション処理部32と、バッファ33と、インタプリタ34とを含む。
 インタプリタ34は、逐次アプリケーションプログラム52の少なくとも一部を解釈して中間コードを生成するとともに、生成した中間コードを格納するバッファ33を有する。本願における中間コードは、制御周期毎に指令値を演算するための命令を包含する概念であり、1または複数の命令、あるいは、1または複数の関数を含んでもよい。そして、モーション処理部32は、インタプリタ34が事前に生成しバッファ33に格納されている中間コードに従って、制御周期毎に指令値を演算する。一般的に、アプリケーションプログラム52に記述される命令(コード)は、逐次実行されるために、指令値の演算周期を保証できないが、本願開示では、このように中間コードを利用することで、モーション処理部32は、制御周期毎に指令値を演算できるようになる。中間コードにおいて記述される命令には、各制御アプリケーションに応じた座標系が用いられてもよい。
 また、制御アプリケーション処理部30は、必要に応じて、モーション処理部32による、ロボット210の制御のための指令値の演算処理のために、適時、共有メモリ41にアクセス可能に構成されている。例えば、モータ222を含む所定の装置とロボット210とを同期制御する際に、当該所定の装置の動きに対応させてロボット210の動きを決定する必要がある場合には、モーション処理部32による演算処理において当該所定の装置に関連する変数であり、共有メモリ41に保持されている変数データを使用する必要がある。このような場合には、制御アプリケーション処理部30は、IECプログラム処理部40を介して共有メモリ41にアクセスし、当該変数データを取得する。
 制御アプリケーション処理部30による共有メモリ41内の変数データの具体的な態様について説明する。第1の形態では、IECプログラム処理部40による指令値演算で使用される変数名と、制御アプリケーション処理部30による指令値演算で使用される変数名とが同一に設定される。この場合、制御アプリケーション処理部30においてモーション処理部32による演算処理が行われる際に、アプリケーションプログラム52に含まれる変数と同一名の変数の値を返すように、制御アプリケーション処理部30からIECプログラム処理部40に対して問合せ処理が行われる。問合せられたIECプログラム処理部40は、同一名の変数が共有メモリ41内に保持されている場合には、当該変数の変数データを制御アプリケーション処理部30に対して返答する。この結果、モーション処理部32による演算処理が継続される。なお、同一名の変数が共有メモリ41内に保持されていない場合には、IECプログラム処理部40は、エラー信号を制御アプリケーション処理部30に対して返答する。
 また、第2の形態では、IECプログラム処理部40による指令値演算で使用される変数名と、制御アプリケーション処理部30による指令値演算で使用される変数名とは、異なる変数名で設定される。その上で、IECプログラム処理部40側の変数名と制御アプリケーション処理部30側の変数名との相関を画定するテーブル(図3を参照)が、制御アプリケーション処理部30に保持されている。この場合、制御アプリケーション処理部30においてモーション処理部32による演算処理が行われる際に、アプリケーションプログラム52に含まれる変数(図3における「制御アプリケーション処理部側の変数」)に対応する、共有メモリ41に保持されている変数(図3における「IECプログラム処理部側の変数」)を特定し、その特定された変数の値を返すように、制御アプリケーション処理部30からIECプログラム処理部40に対して問合せ処理が行われる。問合せ後の返答については、第1の形態と同様である。
 このように共有メモリ41を介して、IECプログラム処理部40と制御アプリケーション処理部30との間で、指令値演算のための変数を共有する形態を採用することで、ユーザは、所定の装置とロボット210とを同期制御するにあたって、IECプログラム処理部40と制御アプリケーション処理部30との間のデータのやり取りを制御するプログラムを別途準備する必要は無くなり、以て、ユーザの負荷軽減が図られる。
 <プログラムの同期実行>
 制御装置100においては、IECプログラム51とアプリケーションプログラム52の同期実行が実現される。制御アプリケーション処理部30のインタプリタ34は、制御周期より長い周期、例えば、制御周期の2倍分の周期毎にアプリケーションプログラム52を逐次実行する。ただし、IECプログラム処理部40のモーション処理部42および制御アプリケーション処理部30のモーション処理部32は、いずれも同一の制御周期毎に指令値を演算する。したがって、制御装置100からの指令値の出力は、いずれも予め定められた制御周期で同期して行われる。このように、IECプログラム処理部40および制御アプリケーション処理部30は、アクチュエータの動きを連続的に制御するためのモーション処理部をそれぞれ有しており、これらのモーション処理部が同期して指令値を演算することで、IECプログラム51に従う制御およびアプリケーションプログラム52に従う制御の両方を制御周期と同期させて実行することができ、これによって制御周期単位での精密な制御が実現される。
 次に、制御装置100におけるIECプログラム51およびアプリケーションプログラム52の実行タイミングの詳細について、図4に基づいて説明する。図4は、制御装置100におけるプログラムの実行タイミングの一例を示す図である。なお、制御装置100においては、プロセッサのリソースを考慮して、優先度が高い高優先度タスク(図4中の上段の処理)と優先度が低い低優先度タスク(図4中の下段の処理)が設定されている。具体的には、下位ネットワークインターフェイス60、IECプログラム処理部40とそのモーション処理部42の実行、および制御アプリケーション処理部30のモーション処理部32の実行は、高優先度タスクとして設定され、制御アプリケーション処理部30のインタプリタ34の実行は低優先度タスクとして設定されている。
 すなわち、下位ネットワークインターフェイス60に関連する入出力リフレッシュ処理B60、IECプログラム51の実行処理B40、IECプログラム51に従ってモーション処理部42によって行われる指令値の演算処理B42、アプリケーションプログラム52に従ってモーション処理部32によって行われる指令値の演算処理B32は、高優先度タスクとして実行される。一方、アプリケーションプログラム52を逐次解釈する処理B34は、低優先度タスクとして実行される。
 ここで、高優先度タスクは、予め定められた制御周期T1毎に繰返し実行される。低優先度タスクは、各制御周期内で高優先度タスクが実行されていない期間に都度実行される。すなわち、制御周期毎に、高優先度タスクの実行時間が割当てられ、高優先度タスクの実行時間以外の時間において、低優先度タスクが実行される。
 まず、高優先度タスクについて説明すると、各制御周期が到来すると、入出力リフレッシュ処理B60が実行された後、IECプログラム処理部40によりIECプログラム51の全体が実行(スキャン)されて、シーケンス制御についての1または複数の指令値が演算される(実行処理B40)。併せて、モーション処理部42によりIECプログラム51に含まれるモーション命令に関するモーション処理が実行されて、モーション命令についての1または複数の指令値が演算される(実行処理B42)。さらに、制御アプリケーション処理部30のモーション処理部32により、バッファ33に格納されている中間コードに従ってロボット210の制御用のモーション指令が準備される(実行処理B32)。以下、同様の処理が制御周期毎に繰返される。なお、モーション処理部32がバッファ33から中間コードを読み出すタイミングは、各制御周期でなくともよい。これは、読み出された中間コードは、複数の制御周期T1にわたって指令値を演算できるだけの命令を含む場合、その複数の制御周期T1においては中間コードの読み出しを一度で行える。
 このように、ある制御周期における高優先度タスクの実行が完了すると、モータ222等に関するシーケンス制御についての指令値及びそのモーション制御についての指令値と、ロボット210に関する制御アプリケーションについての指令値のセットが用意される。これらの指令値は、基本的には、次の制御周期が到来すると、フィールド側に反映される。すなわち、IECプログラム処理部40および制御アプリケーション処理部30は、同一の制御周期で入力データに応じた指令値を演算するので、入力に同期した出力を実現できる。
 一方、低優先度タスクについては、制御アプリケーション処理部30のインタプリタ34は、アプリケーションプログラム52を逐次実行する。すなわち、インタプリタ34は、アプリケーションプログラム52の読込みおよび解析を低優先度で実行する。インタプリタ34がアプリケーションプログラム52を解析処理して生成された中間コードは、バッファ33の容量を考慮しながら、逐次、バッファ33に格納される。バッファ33に格納された中間コードは、制御アプリケーション処理部30のモーション処理部32により順次参照されて、演算処理B32での指令値の生成に用いられる。このとき、インタプリタ34は、高優先度タスクの演算周期である制御周期の整数倍分の中間コードを事前に余分に生成しておくことで、モーション処理部32による処理に影響を与えることなく、制御アプリケーションに対する指令値を制御周期毎に演算できる。
 また、インタプリタ34は、予め定められた制御アプリケーション同期周期(制御周期の整数倍)が到来する前に、アプリケーションプログラム52の解釈を一時停止する。その一時停止したタイミングで、IECプログラム処理部40と制御アプリケーション処理部30との間でデータ同期を行うことで、双方に整合性をもつデータを共有する。このように、インタプリタ34は、同期周期毎に、IECプログラム処理部40との間で共有するデータを更新する。共有データの更新に併せて、フィールド側から取得される入力データおよび出力データについても更新(データ同期)するようにしてもよい。これにより、制御アプリケーション処理部30側でも、IECプログラム処理部40で取得されたデータを利用してロボット210の制御が可能となる。制御アプリケーション同期周期は、制御周期の整数倍に設定されれば、どのような長さであってもよい。制御アプリケーションにおいて要求される制御の精度などに応じて、適宜設定される。
 次に、図5、図6に基づいて、制御装置100によるフィールド機器(ロボット210及びモータ222)の処理の流れについて説明する。図5は、上述した高優先度タスクの処理に関するフローチャートであり、図6は、上述した低優先度タスクの処理に関するフローチャートである。
 先ず、高優先度タスクの処理の流れについて説明する。制御周期T1が到来すると、下位ネットワークインターフェイス60が入出力リフレッシュ処理を実行する(S101の処理)。これによって、直前の制御周期T1において演算された指令値(B40、B42、B32等による指令値)がフィールド機器のアクチュエータ等へ出力されるとともに、フィールド機器からの入力データが取得される。続いて、S102において、今回の制御周期がデータ同期のタイミングと一致するか否かが判定される。そこで肯定判定されると、IECプログラム処理部40と制御アプリケーション処理部30との間でデータ同期が実行される(S103の処理)。またS102で否定判定されると、処理はS104へ進む。
 次に、S104では上記の実行処理B40が行われ、続いてS105では上記の実行処理B42が行われる。その後、S106で、ロボット210を制御するためのモーション指令の準備を行う、上記のロボット実行処理B32が行われる。そして、ロボット実行処理B32が行われる際に、アプリケーションプログラム52に所定の変数が含まれている場合には、上述した第1の形態又は第2の形態に従って、共有メモリ41内に保持されている、対応する変数の値が利用される。
 図5に示す高優先度タスクの一連の処理により演算、準備された指令値は、次の制御周期T1が到来したときにフィールドへ出力される。そして、当該一連の処理の終了後であって次の制御周期T1が到来するまでの期間において、図6に示す低優先度タスクが実行されることになる。
 図6に基づいて、低優先度タスクの処理の流れについて説明する。低優先度タスクは、インタプリタ34によるアプリケーションプログラム52の解釈処理に関するものである。先ず、S201で、制御アプリケーション処理部30により、バッファ33に中間コードが残っているか否かが判定される。当該判定を行うのは、バッファ33の容量を超えた中間コードの生成を行わないようにするためである。S201で肯定判定されれば低優先度タスクは終了し、否定判定されれば処理はS202へ進む。S202では、インタプリタ34によって、アプリケーションプログラム52の一部が読み込まれる。例えば、アプリケーションプログラム52を構成するコードの一行分が読み込まれる。そして、S203では、インタプリタ34によって読込んだコードが解釈されて中間コードが生成される。生成された中間コードは、S204でバッファ33に格納される。なお、S202~S204の処理に関し、実行対象となるアプリケーションプログラムが存在しない場合にはこれらの処理は行われず、結果として、バッファ33には中間コードは格納されないことになる。このような一連の処理を有する低優先度タスクは、自身に対してプログラムの実行時間が割当てられている期間において繰返される。
 このように図5、図6に示す一連の処理が行われることで、制御装置100において、図4に示す実行タイミングで、IECプログラム51およびアプリケーションプログラム52が実行されることになる。
 <付記1>
 実行毎に全体が実行される第1の実行形式に従ったプログラム(51)と、逐次実行される第2の実行形式に従ったプログラム(52)と、を有する制御装置(100)であって、
 予め定められた制御周期毎に前記第1の実行形式に従ったプログラム(51)を実行して第1の制御対象(222)を制御するための第1の指令値を演算可能に構成された第1処理部(40)と、
 前記第2の実行形式に従ったプログラム(52)を実行してインタプリタ(34)により該プログラムの少なくとも一部が解釈されて生成される中間コードに従って前記制御周期毎に第2の制御対象(210)を制御するための第2の指令値を演算可能に構成された第2処理部(30)と、
 前記第1の指令値および前記第2の指令値を前記制御周期毎に出力する出力部(60)と、
 を備え、
 前記第1処理部(40)と前記第2処理部(30)のうちいずれか一方の処理部が、該第1処理部(40)による演算と該第2処理部(30)による演算の両方において使用可能な所定変数を保持し、該第1処理部(40)と該第2処理部(30)のうち他方の処理部は、該一方の処理部を介して該所定変数にアクセス可能に構成される、
 制御装置。
2: フィールドネットワーク
6: 上位ネットワーク
10: サーバ装置
30: 制御アプリケーション処理部
40: IECプログラム処理部
51: IECプログラム
52: アプリケーションプログラム
100: 制御装置
210: ロボット
220: サーボドライバ
222: モータ

Claims (4)

  1.  実行毎に全体が実行される第1の実行形式に従ったプログラムと、逐次実行される第2の実行形式に従ったプログラムと、を有する制御装置であって、
     予め定められた制御周期毎に前記第1の実行形式に従ったプログラムを実行して第1の制御対象を制御するための第1の指令値を演算可能に構成された第1処理部と、
     前記第2の実行形式に従ったプログラムを実行してインタプリタにより該プログラムの少なくとも一部が解釈されて生成される中間コードに従って前記制御周期毎に第2の制御対象を制御するための第2の指令値を演算可能に構成された第2処理部と、
     前記第1の指令値および前記第2の指令値を前記制御周期毎に出力する出力部と、
     を備え、
     前記第1処理部と前記第2処理部のうちいずれか一方の処理部が、該第1処理部による演算と該第2処理部による演算の両方において使用可能な所定変数を保持し、該第1処理部と該第2処理部のうち他方の処理部は、該一方の処理部を介して該所定変数にアクセス可能に構成される、
     制御装置。
  2.  前記一方の処理部は前記第1処理部であり、前記他方の処理部は前記第2処理部である、
     請求項1に記載の制御装置。
  3.  前記所定変数は、前記一方の処理部による演算と前記他方の処理部による演算とにおいて、同一の変数名に設定され、
     前記他方の処理部によって前記所定変数を使用するとき、該他方の処理部は、前記一方の処理部において該所定変数と同一の変数名を有する変数の値を該所定変数の値として使用する、
     請求項1又は請求項2に記載の制御装置。
  4.  前記一方の処理部による演算における前記所定変数の第1変数名と、前記他方の処理部による演算における前記所定変数の第2変数名とは異なり、
     前記第1変数名と前記第2変数名との相関を画定する相関情報が保持され、
     前記他方の処理部によって前記所定変数として前記第2変数名の変数を使用するとき、該他方の処理部は、前記相関情報に基づいて該第2変数名に関連付けられた前記第1変数名の変数の値を該所定変数の値として使用する、
     請求項1又は請求項2に記載の制御装置。
PCT/JP2020/039564 2019-11-12 2020-10-21 制御装置 WO2021095466A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP20887884.3A EP4036670A4 (en) 2019-11-12 2020-10-21 CONTROL DEVICE
CN202080073707.9A CN114585979A (zh) 2019-11-12 2020-10-21 控制装置
US17/771,449 US20220397880A1 (en) 2019-11-12 2020-10-21 Control device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019204825A JP7294078B2 (ja) 2019-11-12 2019-11-12 制御装置
JP2019-204825 2019-11-12

Publications (1)

Publication Number Publication Date
WO2021095466A1 true WO2021095466A1 (ja) 2021-05-20

Family

ID=75897935

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/039564 WO2021095466A1 (ja) 2019-11-12 2020-10-21 制御装置

Country Status (5)

Country Link
US (1) US20220397880A1 (ja)
EP (1) EP4036670A4 (ja)
JP (1) JP7294078B2 (ja)
CN (1) CN114585979A (ja)
WO (1) WO2021095466A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024018790A (ja) * 2022-07-29 2024-02-08 株式会社日立産機システム コントロールシステム及び方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0772920A (ja) * 1993-09-03 1995-03-17 Hitachi Ltd Faシステムの制御方法及び装置
JPH11288304A (ja) * 1998-04-02 1999-10-19 Mitsubishi Electric Corp 機器系統の監視制御方法
JP2012194662A (ja) 2011-03-15 2012-10-11 Omron Corp Plcのcpuユニット、plc用システムプログラムおよびplc用システムプログラムを格納した記録媒体
JP2018185772A (ja) * 2017-04-27 2018-11-22 株式会社日立産機システム 産業用コントローラ及び産業用コントローラにおけるデータ共有方法
JP2019036043A (ja) 2017-08-10 2019-03-07 オムロン株式会社 制御装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6953768B2 (ja) * 2017-04-06 2021-10-27 富士電機株式会社 支援装置、プログラム
JP6950385B2 (ja) * 2017-09-12 2021-10-13 オムロン株式会社 制御装置および制御方法
JP6903275B2 (ja) * 2017-09-14 2021-07-14 オムロン株式会社 制御装置および制御方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0772920A (ja) * 1993-09-03 1995-03-17 Hitachi Ltd Faシステムの制御方法及び装置
JPH11288304A (ja) * 1998-04-02 1999-10-19 Mitsubishi Electric Corp 機器系統の監視制御方法
JP2012194662A (ja) 2011-03-15 2012-10-11 Omron Corp Plcのcpuユニット、plc用システムプログラムおよびplc用システムプログラムを格納した記録媒体
JP2018185772A (ja) * 2017-04-27 2018-11-22 株式会社日立産機システム 産業用コントローラ及び産業用コントローラにおけるデータ共有方法
JP2019036043A (ja) 2017-08-10 2019-03-07 オムロン株式会社 制御装置

Also Published As

Publication number Publication date
EP4036670A1 (en) 2022-08-03
CN114585979A (zh) 2022-06-03
EP4036670A4 (en) 2023-11-01
JP2021077219A (ja) 2021-05-20
JP7294078B2 (ja) 2023-06-20
US20220397880A1 (en) 2022-12-15

Similar Documents

Publication Publication Date Title
US10761884B2 (en) Control device for operating multiple types of programs in different execution formats
JP6903275B2 (ja) 制御装置および制御方法
CN109388107B (zh) 控制装置
US10606246B2 (en) Control device and control method with various command values in a shared memory providing access to various program execution and command value operation parts in each control cycle
US20190095246A1 (en) Support device and non-transitory storage medium
JP7310465B2 (ja) 同期制御装置、同期制御システム、同期制御方法、及びシミュレーション装置
WO2021095466A1 (ja) 制御装置
US11269313B2 (en) Controller and control system that stores data in current control cycle for output in next control cycle
WO2020255486A1 (ja) 制御装置
WO2021145124A1 (ja) 制御装置
JP7396063B2 (ja) データ処理方法
WO2020137522A1 (ja) 同期制御装置、同期制御システム、同期制御方法、及びシミュレーション装置
WO2021024523A1 (ja) 制御装置
JP2022048289A (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: 20887884

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020887884

Country of ref document: EP

Effective date: 20220426

NENP Non-entry into the national phase

Ref country code: DE