The present invention relates to a control device for controlling multiple control targets.
Factory automation (FA) techniques using control devices such as programmable logic controllers (PLCs) have been widespread at various production sites. Such a control device may indirectly control, in addition to directly controlling, a control target through another device by providing a control command to the other device. Control systems including multiple dedicated devices are to integrate such devices into fewer control devices. For example, with the technique described in Patent Literature 1, a central processing unit (CPU) module in a PLC executes a motion computation program and a user program in synchronization.
Patent Literature 2 describes a technique for performing control computations in accordance with multiple programs in different execution formats with a single control device. For example, this technique computes command values for a program in one format in which the overall program is executed in every control cycle and for a program in another format in which parts of the program are executed successively in accordance with intermediate codes generated through interpretation of each part of the program. The computed command values are output together in every control cycle.
Patent Literature 3 describes a control device for synchronizing multiple signals that are periodically generated by different clocks. The control device with this technique includes a first processor that obtains a synchronization signal generated in every first cycle, and a second processor that generates second cycles each having a length obtained by dividing the first cycle by n (n≥1), generates, using a timer, a control signal in every third cycle having a length obtained by dividing the second cycle by m (m≥2), and performs predetermined processing at timing based on the control signal. At least one of multiple control signals generated in first cycles is to be synchronized with the synchronization signal. Upon detecting an error in timing between the synchronization signal and the control signal to be synchronized with the synchronization signal, the second processor temporarily changes the timer interval for subsequent cycles to correct the error.
For example, a known system may synchronize master-slave operations with a master operation using a rotational shaft in an apparatus that transports containers and a slave operation using a nozzle filling the containers with any filler. Another known system may synchronize master-slave operations with a master operation using a conveyor that transports workpieces and a slave operation using a robot that performs an operation on the workpieces. Such systems involve a user correcting delays in master-slave operations resulting from communication cycles.
In response to the above issue, one or more aspects of the present invention are directed to a technique for easy synchronous control of operations of field devices.
A control device according to an aspect of the present invention causes a plurality of field devices to operate in coordination with one another in accordance with a predetermined program through a network allowing periodic communication. The control device includes an estimator that calculates, based on a position of a first field device in a first cycle, a position of the first field device operable in accordance with a first program in a second cycle following the first cycle, and a processor that determines, based on the first program, a first command value to cause the first field device to operate, transmits the first command value to the first field device through an interface allowing communication with the plurality of field devices, determines, based on the position calculated by the estimator and a second program, a second command value to cause a second field device to operate in coordination with the first field device, and transmits the second command value to the second field device through the interface.
When a field device is controlled through a network that allows periodic communication, a delay of cycles taken for processing and communication may occur before the field device receives a command value and performs the operation. In the above control device, the estimator calculates the position of the first field device in a subsequent cycle (second cycle), and the processor determines, based on the calculated position, a command value for an operation of the second field device to operate in coordination with the first field device. In other words, an instruction for the operation of the second field device, which uses the position of the first field device in the subsequent cycle as a target, can accommodate a delay between transmission of the command value and reception of the command value in the second field device. The technique allows easy synchronous control of operations of field devices.
The estimator may calculate the position of the first field device in the second cycle by adding, to the position of the first field device in the first cycle, a value determined by multiplying an operating speed of the first field device by a predetermined correction coefficient. The position of the first field device in the second cycle can be estimated through, for example, the calculation above.
One of the first program or the second program may be in a first execution format in which an overall program is executed at every execution, and another one of the first program or the second program may be in a second execution format in which parts of the program are executed successively. The predetermined correction coefficient may be determined in accordance with a combination of types of the first field device and the second field device, and the combination may include a device operable in accordance with the program in the first execution format and a device operable in accordance with the program in the second execution format. The first execution format is a format in which the overall program is executed at every execution of the program. Examples of such a program include an International Electrotechnical Commission (IEC) program containing instructions for sequence control and motion control. The second execution format is a format in which parts of the program are executed successively. Examples of such a program include an application program for mainly controlling a robot. In this case, the delay varies depending on, for example, whether each of the first field device serving as a reference for coordinated operations and the second field device that operates in coordination with the first field device is a device that operates in the first execution format or a device that operates in the second execution format. Thus, the correction coefficient may be determined in accordance with a combination of the types of first field device and second field device, thus allowing appropriate estimation.
The processor may include a first processor that executes the program in the first execution format in every control cycle in the periodic communication and computes a command value to control one of the plurality of field devices, and a second processor that executes the program in the second execution format and computes a command value to control another of the plurality of field devices in every control cycle in accordance with an intermediate code generated by an interpreter interpreting at least a part of the program in the second program, and also computes the command value to control the other of the plurality of field devices in response to the first processor executing the program in the first execution format. The first processor and the second processor may each transmit the computed command value in every control cycle through the interface.
The first processor and the second processor each transmit a calculated command value in every control cycle in the periodic communication described above, thus allowing integrated control of, for example, a motion shaft and a robot and easy synchronous control of their operations.
The position of the first field device in the first cycle may be a feedback value fed back from the first field device or a command value transmitted to the first field device. The predetermined correction coefficient may be determined in accordance with one of the feedback value or the transmitted command value to be used as the position of the first field device in the first cycle. More specifically, either of the values described above may be used to indicate the position of the first field device in the first cycle. The delay differs for each of the two values. The correction coefficient may thus be determined with one of the two values to be used, thus allowing appropriate estimation.
The periodic communication may include communication in accordance with an EtherCAT (registered trademark) standard. Such a standard allows a field network to perform the processing described above.
The technique according to the above aspects allows easy synchronous control of operations of field devices.
Example Use
An example use of a control device according to an embodiment will now be described with reference to
The control device 100 corresponds to an industrial controller that controls targets such as various pieces of equipment and apparatuses. The control device 100 is a computer that performs control computations described later. The control device 100 may be connected to field devices with a field network 2. The field devices include, for example, an actuator and an input-output device. The actuator physically acts on a manufacturing apparatus or at a production line (hereafter collectively referred to as a field). The input-output device exchanges information with the field. In
The control device 100 exchanges data with one or more field devices through, for example, the field network 2. Afield network is generally referred to as a fieldbus, but is referred to as a field network herein for simplicity of explanation. The control device 100 collects data (hereafter referred to as input data) collected or generated by various field devices (input process), generates data (hereafter referred to as output data) including commands to the field devices (computation process), and transmits the generated output data to the corresponding field devices (output process).
The field network 2 herein may be a bus or a network that allows periodic communication for on-time arrival of data. Known buses or networks for such periodic communication include Ethernet for Control Automation Technology (EtherCAT) (registered trademark). Data exchanged between the control device 100 and the field devices through the field network 2 is updated in short cycles in the order of several hundreds of microseconds to several tens of milliseconds. Such updating of exchanged data may be referred to as input-output refresh.
The control device 100 is also connected to other devices with an upper network 6. The upper network 6 may use a common network protocol such as Ethernet (registered trademark) and EtherNet/IP (registered trademark). More specifically, one or more servers 10 may be connected to the upper network 6. The server 10 may be, for example, a database system or a manufacturing execution system (MES). The MES obtains information from a control target, such as a manufacturing apparatus or equipment, to monitor and manage the overall production. The MES may also manage other information such as order information, quality information, and shipping information. Devices connected to the upper network 6 are not limited to the above. A device that provides information services may also be connected to the upper network 6.
The structure of the control device 100 will now be described with reference to
In one or more embodiments of the present disclosure, the overall IEC program 51 is scanned at every execution of the program for computing one or more command values at every execution of the program. The IEC program 51 typically includes a program containing one or more instructions written in accordance with the international standard IEC 61131-3 defined by the International Electrotechnical Commission (IEC). The IEC program 51 contains instructions for sequence control and motion control. The IEC program 51 is in an execution format in which the overall program is executed (scanned) in every control cycle, and is thus suitable for control to be performed immediately at high speed. In contrast, the application program 52 in one or more embodiments of the present invention is a control program for a specific process or operation using a robot. The application program 52 includes a program containing one or more instructions to implement a control application using a robot. The application program 52 is basically distinguished from the IEC program 51. In one example, the application program 52 for controlling a robot is an interpreter written in a robot language executed successively line by line.
As shown in
The IEC program processor 40 executes (scans) the IEC program 51 in every predetermined control cycle and computes one or more command values. In other words, the IEC program processor 40 computes one or more command values in accordance with the IEC program 51 in every control cycle. In one or more embodiments of the present disclosure, the IEC program 51 is executed to control a predetermined apparatus including the motor 222. A motion processor 42 computes a command value in accordance with a motion instruction included in the IEC program 51 in every control cycle. More specifically, the motion instruction included in the IEC program 51 includes an instruction for a motion to continue for multiple control cycles (e.g., an instruction to cause an output from the predetermined apparatus including the motor 222 to indicate a predetermined path). In response to the motion instruction being implemented, the motion processor 42 computes a command value in every control cycle in accordance with the executed motion instruction. In other words, the motion processor 42 outputs a command value to the above predetermined apparatus in every control cycle to cause the motion specified by the motion instruction. The motion processor 42 corresponds to a first processor in an aspect of the present invention.
The control application processor 30 computes a command value for controlling the control application based on, for example, the application program 52 and recipe information. In one or more embodiments of the present disclosure, the control application processor 30 executes the application program 52 to control the robot 210. In synchronization with the computation and output of a command value by the IEC program processor 40, the control application processor 30 computes a command value for the control application and outputs the command value. In other words, the control application processor 30 computes a command value in synchronization with computation performed by the IEC program processor 40. Synchronization of the IEC program processor 40 and the control application processor 30 will be described later. To compute a command value in synchronization with the computation of a command value by the IEC program processor 40, the control application processor 30 includes a motion processor 32, a buffer 33, and an interpreter 34.
The interpreter 34 successively interprets at least a part of the application program 52 and generates an intermediate code. The interpreter 34 includes the buffer 33 that stores the generated intermediate code. The intermediate code in one or more embodiments of the present disclosure includes an instruction for computing a command value in every control cycle, and may include one or more instructions or one or more functions. The motion processor 32 computes a command value in every control cycle in accordance with an intermediate code pre-generated by the interpreter 34 and stored in the buffer 33. An instruction (code) written in the application program 52 is typically executed successively. Thus, the command value may not be computed in cycles. In one or more embodiments of the present disclosure, the intermediate code allows the motion processor 32 to compute the command value in every control cycle. The instruction written in the intermediate code may use a coordinate system in accordance with the control application. The motion processor 32 corresponds to a second processor in an aspect of the present invention. The motion processor 32 and the motion processor 42 each correspond to a processor in an aspect of the present invention.
The control device 100 includes the shared memory 71 for data sharing between the IEC program processor 40 and the control application processor 30. In one or more embodiments of the present disclosure, the shared memory 71 stores a part or all of the results of processing performed by the control application processor 30. The IEC program processor 40 can refer to data stored in the shared memory 71. The IEC program processor 40 may also write data to the shared memory 71. Such data written by the IEC program processor 40 can be referred to by the interpreter 34 and the motion processor 32. The estimator 70 may also write and read data to and from the shared memory 71.
As described above, the motion processor 32 uses the intermediate code generated by the interpreter 34 to control the robot 210. In another embodiment, the motion processor 32 may control the robot 210 in response to execution of the IEC program 51. In this case, the IEC program 51 contains a control command (motion command) for the robot 210. In response to the IEC program processor 40 executing the IEC program 51, the control command for the robot 210 contained in the IEC program 51 is output to the motion processor 32, which then controls the robot 210 based on the control command.
As described above, the control device 100 can control the robot 210 in accordance with both the IEC program 51 and the application program 52 in different execution formats. The control system 1 can thus have a flexible structure to implement a user request based on the characteristics of each program.
The estimator 70 performs estimation for correcting a delay in operations of multiple field devices that are to operate in coordination. For example, based on a value representing the current position or posture of a field device serving as a reference for operations (also referred to as an operation master device), a command value is calculated for an operation of another field device (also referred to as an operation slave device) that is to operate in coordination with the operation master device. At a time point at which the operation slave device performs the operation in accordance with a control command containing the command value, the operation master device may have moved further or may have changed the posture. This delay in an operation can result from a difference in communication cycles or from the time taken for data processing. The estimator 70 thus estimates the position or posture of the operation master device at the time point at which the operation slave device performs the operation. The motion processor 32 and the motion processor 42 transmit, to the operation slave device, command values based on an estimated value. In this manner, the estimator 70 performs lead angle correction to cause the operation slave device to operate earlier than the operation master device. This allows the user of the control device 100 to easily perform synchronous control of operations. The control device 100 controls the master device and the slave device in an integrated manner. More specifically, the control device 100 controls the field devices in accordance with both the IEC program 51 and the application program 52, and thus can control the master device and the slave device in different execution formats in an integrated manner.
Synchronous Execution of Programs
The control device 100 synchronously executes the IEC program 51 and the application program 52. The interpreter 34 in the control application processor 30 successively executes parts of the application program 52 in cycles longer than control cycles, or for example, in every cycle (control application synchronization cycle T2) with a length twice the length of the control cycle. Each of the motion processor 42 in the IEC program processor 40 and the motion processor 32 in the control application processor 30 computes a command value in every control cycle with the same length. Command values are thus synchronously output from the control device 100 in predetermined control cycles. As described above, each of the IEC program processor 40 and the control application processor 30 includes a motion processor for continuously controlling the operation of an actuator. These motion processors synchronously compute command values to perform both control in accordance with the IEC program 51 and control in accordance with the application program 52 in cycles synchronized with control cycles. This allows accurate control in control cycles.
The execution timing of the IEC program 51 and the application program 52 in the control device 100 will now be described in detail with reference to
More specifically, high-priority tasks include input-output refresh B60 associated with the lower network interface 60, execution B40 of the IEC program 51, computation B42 of a command value performed by the motion processor 42 in accordance with the IEC program 51, computation B32 of a command value performed by the motion processor 32 in accordance with the application program 52, and computation B32′ of a command value performed by the motion processor 32 in response to the IEC program 51. Low-priority tasks include successive interpretation B34 of the application program 52. The high-priority tasks performed in one control cycle T1 include either the computation B32 or the computation B32′.
The high-priority tasks are performed in every predetermined control cycle T1. The low-priority task is performed while the high-priority tasks are not being performed in each control cycle. More specifically, each high-priority task has an allotted time to be performed in every control cycle, whereas the low-priority task is performed at a time other than a time at which any high-priority task is performed.
The high-priority tasks will be described first. At the start of each control cycle, the input-output refresh B60 is performed. The IEC program processor 40 then executes (scans) the overall IEC program 51 to compute one or more command values for sequence control (execution B40). The motion processor 42 also performs motion processing for a motion instruction contained in the IEC program 51 to compute one or more command values for the motion instruction (execution B42). The motion processor 32 in the control application processor 30 then prepares a motion command for controlling the robot 210 in accordance with an intermediate code stored in the buffer 33 (execution B32), or prepares a motion command for controlling the robot 210 contained in the IEC program 51 (execution B32′). Either the execution B32 or the execution B32′ is selected based on a predetermined criterion. The same processing is thereafter performed in every control cycle. The motion processor 32 may read the intermediate code from the buffer 33 at any timing that may not be in every control cycle. When the read intermediate code contains an instruction to compute command values for multiple control cycles T1, the intermediate code for the multiple control cycles T1 can be read once.
In this manner, the high-priority tasks are performed in one control cycle, followed by preparation of a set of a command value for sequence control for, for example, the motor 222, a command value for motion control for, for example, the motor 222, and a command value for the control application for the robot 210. These command values are normally output to the field at the start of the next control cycle. More specifically, the IEC program processor 40 and the control application processor 30 compute command values in accordance with input data in the same control cycles. This allows output synchronized with input.
For the low-priority task, the interpreter 34 in the control application processor 30 successively executes parts of the application program 52. More specifically, the interpreter 34 reads and analyzes the application program 52 with a lower priority. The interpreter 34 analyzes the application program 52 to generate intermediate codes, which is successively stored into the buffer 33 based on the capacity of the buffer 33. The intermediate codes stored in the buffer 33 are sequentially referred to by the motion processor 32 in the control application processor 30 to generate a command value in the computation B32. In this case, the interpreter 34 pre-generates extra intermediate codes corresponding to an integral multiple of the control cycle as the computation cycle of the high-priority tasks. This allows computation of a command value for the control application in every control cycle without affecting the processing performed by the motion processor 32.
The interpreter 34 temporarily stops interpreting the application program 52 before the start of a cycle with a predetermined control application synchronization cycle (an integer multiple of the control cycle). At the temporary stop, data synchronization is performed between the IEC program processor 40 and the control application processor 30 to have the two processors sharing consistent data. In this manner, the interpreter 34 updates data shared with the IEC program processor 40 in every synchronization cycle. At the same time with the update of the shared data, input data obtained from the field and output data may also be updated (synchronized). This allows the control application processor 30 to control the robot 210 by using data obtained by the IEC program processor 40. The control application synchronization cycle may have any length that is an integer multiple of the control cycle. The length of the control application synchronization cycle may be set as appropriate depending on, for example, the control accuracy for the control application.
Synchronous Control of Field Devices
In a first cycle (C1 in
In cycle C11, data representing the current position is input at IN for the master device for feedback. In cycle C12, at ECAT for the master device and I/O for the control device, data is fed back to the control device 100. At MC and RC for the control device, control commands for the field devices are generated. In cycle C13, the control commands are transmitted at I/O for the control device and ECAT for the slave device and are read at OUT for the slave device. A trajectory of the operation of the robot 210 is calculated at Trajectory. In subsequent cycle C14, the robot 210 operates in accordance with the calculated trajectory. The processing for blocks other than the processing described above is also performed in parallel.
As shown in
The estimated position can be calculated using the position (current position) of the shaft of the motor 222 and its operating speed. For example, the estimated position may be determined using Formula 1 below.
Estimated position=Current position+(current speed×correction coefficient) (1)
The current position may be a value fed back by the servo driver 220 or may be a command value in a control command to the servo driver 220. The current speed may be fed back by the servo driver 220 or may be calculated using a data row indicating current positions in past cycles. The correction coefficient is a predetermined value, and may be set in accordance with the combination of the types of the operation master device and the operation slave device. For example, the correction coefficient may be determined in association with the combination of the types of the operation master device and the operation slave device being a robot or a motor. Different correction coefficients may be used depending on whether the position fed back is used or the position indicated by the control command is used as the current position of the master device.
Correction Process
The estimator 70 then estimates a position expected to be reached by the master device (S102 in
The motion processor 32 or the motion processor 42 determines, based on the estimated position expected to be reached, a command value for the slave device and transmits the value to the slave device (S103 in
The control device 100 determines whether to end the process (S104 in
As described above, in a system that performs periodic communication, the control device 100 can correct delays in communication and operation that occur when a field device receives a control command based on the current position and operates. In particular, the control device 100 can execute the application program 52 and the IEC program 51 in a synchronized manner, and thus can correct delays in an integrated manner for the operation master device and the operation slave device being, for example, a motor and a robot in different execution formats.
Although the embodiment has been described above, the control device described above is a mere example, and the control device according to one or more aspects of the present invention is not limited to the above structure. The components described in the embodiment may be modified or combined in any possible manner without departing from the spirit and the technical idea of the present invention.
A control device (100) for causing a plurality of field devices (210, 220) to operate in coordination with one another in accordance with a predetermined program through a network (2) allowing periodic communication, the control device (100) comprising:
Number | Date | Country | Kind |
---|---|---|---|
2019-145127 | Aug 2019 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2020/007163 | 2/21/2020 | WO |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2021/024523 | 2/11/2021 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
7330777 | Hashimoto | Feb 2008 | B2 |
9046890 | Krause et al. | Jun 2015 | B2 |
20040199290 | Stoddard et al. | Oct 2004 | A1 |
20060287769 | Yanagita | Dec 2006 | A1 |
20140005835 | Nishiyama | Jan 2014 | A1 |
20160023355 | Komatsu | Jan 2016 | A1 |
20180264649 | Ojima et al. | Sep 2018 | A1 |
20180314233 | Horiguchi | Nov 2018 | A1 |
20190049925 | Shimamura | Feb 2019 | A1 |
20190079500 | Nakano et al. | Mar 2019 | A1 |
20190101881 | Shimamura et al. | Apr 2019 | A1 |
20210063989 | Taniguchi | Mar 2021 | A1 |
20210135836 | Yoneda | May 2021 | A1 |
Number | Date | Country |
---|---|---|
105024777 | Nov 2015 | CN |
109507980 | Mar 2019 | CN |
109581976 | Apr 2019 | CN |
2012194662 | Oct 2012 | JP |
2014119904 | Jun 2014 | JP |
2018190068 | Nov 2018 | JP |
2019036043 | Mar 2019 | JP |
2019062288 | Apr 2019 | JP |
2019101480 | Jun 2019 | JP |
Entry |
---|
Extended European Search Report issued in European Appln. No. 20851183.2 mailed Jun. 2, 2023. |
International Search Report issued in Intl. Appln. No. PCT/JP2020/007163 mailed Apr. 14, 2020. English translation provided. |
Written Opinion issued in Intl. Appln. No. PCT/JP2020/007163 mailed Apr. 14, 2020. English translation provided. |
Office Action issued in Chinese Appln. No. 202080054963.3, mailed Mar. 5, 2024. English translation provided. |
Number | Date | Country | |
---|---|---|---|
20220269238 A1 | Aug 2022 | US |