Controls
By predicting and correcting the position and command value of field equipment in the control device, using fixed period communication and the EtherCAT standard, the communication delay problem in the action synchronization control of the master-slave device is solved, and simple action synchronization and unified control of the field equipment are realized. .
Patent Information
- Application Number
- CN202080054963.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-07
- Filing Date
- 2020-02-21
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-02-21
AI Technical Summary
In the existing technology, the action synchronization control of master-slave devices has the problem of communication cycle delay, making it difficult to achieve simple action synchronization.
By installing a prediction unit in the control device, the position of the second period is calculated based on the position of the first period, and the command value is determined by the processing unit and sent to the field device to achieve coordination of actions. Fixed period communication and EtherCAT standards are used for network communication. , appropriately correct the delay amount to achieve synchronization.
It realizes simple action synchronization control of on-site equipment, can uniformly control the action axis and robot, adapts to equipment combinations of different execution forms, and improves the coordination and consistency of actions.
Smart Images

Figure CN114207534B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a control device capable of controlling a plurality of control objects. Background Art
[0002] In various production sites, factory automation (FA) technology using control devices such as programmable logic controllers (PLCs) has become widely popular. Such control devices not only directly control the control object, but also indirectly control the control object by providing control instructions to other devices. In addition, there is a demand to merge the control system previously implemented using multiple dedicated devices into a smaller number of control devices. For example, in the technology shown in patent document 1, the action operation program and the user program are executed synchronously in the CPU unit of the PLC.
[0003] In addition, Patent Document 2 discloses a technique for realizing control operations of a plurality of programs in different execution forms by a single control device. In this technique, for example, a structure is adopted in which command value operations are performed for a program in which the entire program is executed in each control cycle and a program in which intermediate codes generated by partial interpretation are sequentially executed, and each command value is outputted collectively in each control cycle.
[0004] In addition, Patent Document 3 discloses a technology for synchronizing a plurality of signals generated periodically by different clocks in a control device. In this technology, the control device includes: a first processor that obtains a synchronization signal generated in each first cycle; and a second processor that generates a second cycle obtained by dividing the first cycle into n (n≥1), and uses a timer to generate a control signal in each third cycle obtained by dividing the second cycle into m (m≥2), and performs a predetermined process based on the timing of the control signal. In addition, at least one of the plurality of control signals generated in the first cycle is a control signal that should be synchronized with the synchronization signal. When the second processor detects that a timing error has occurred between the synchronization signal and the control signal that should be synchronized with the synchronization signal, the second processor corrects the error by temporarily changing the width of the timer that starts next time or later.
[0005] Prior art literature
[0006] Patent Literature
[0007] Patent Document 1: Japanese Patent Application Publication No. 2012-194662
[0008] Patent Document 2: Japanese Patent Application Publication No. 2019-36043
[0009] Patent Document 3: Japanese Patent Application Publication No. 2019-101480 Summary of the invention
[0010] Problems to be solved by the invention
[0011] In the past, for example, when the movements of a rotating shaft of a device for transporting a container are the master device and the movements of a nozzle for filling the container with contents are the slave device, and the movements of a master and a slave are synchronized, or when the movements of a conveyor for transporting a workpiece are the master device and the movements of a robot for operating the workpiece are the slave device, and the movements of a master and a slave are synchronized, the user needed to correct the delay in the movements between the master and the slave caused by the communication cycle.
[0012] The present invention has been made in view of the above-mentioned problems, and an object of the present invention is to provide a technology for performing synchronous control of the operations of field devices in a simple manner.
[0013] Means for solving problems
[0014] The control device according to the present invention makes a plurality of field devices perform coordinated actions according to a prescribed program via a network that performs fixed-cycle communication. In addition, the control device includes: a prediction unit that calculates the position of the first field device that performs actions according to a first program in a second cycle after the first cycle based on the position of the first field device in the first cycle; and a processing unit that determines a first instruction value for causing the first field device to perform actions based on the first program, sends the first instruction value to the first field device via an interface unit for communicating with a plurality of field devices, and determines a second instruction value for causing a second field device that should perform coordinated actions with the first field device to perform actions based on the position calculated by the prediction unit and the second program, and sends the second instruction value to the second field device via the interface unit.
[0015] When field devices are controlled via a network that performs fixed-cycle communication, a delay corresponding to the cycle required for processing and communication occurs before the field devices receive command values and perform actions. According to the control device, the prediction unit calculates the position of the first field device in the next cycle (second cycle), and the processing unit determines the command value of the action of the second field device that should coordinate the action with the first field device based on the position. That is, the delay until the command value reaches the second field device is estimated, and the action of the second field device can be instructed with the position of the first field device in the next cycle as the target. Therefore, the synchronous control of the actions of the field devices can be easily performed.
[0016] Alternatively, the prediction unit may calculate the position of the first field device in the second cycle by adding a value obtained by multiplying the operating speed of the first field device by a predetermined correction coefficient to the position of the first field device in the first cycle. For example, such calculation processing can predict the position of the first field device in the second cycle.
[0017] In addition, one of the first program and the second program may be a program that follows a first execution form in which the entire program is executed each time, and the other may be a program that follows a second execution form in which the entire program is executed one by one. Furthermore, the prescribed correction coefficient may also be determined based on a combination of the types of the first field device and the second field device, including a type of device that operates in accordance with the program that follows the first execution form and a type of device that operates in accordance with the program that follows the second execution form. The first execution form is a form in which the entire program is executed each time, such as an IEC (International Electrotechnical Commission) program that includes commands for sequence control and motion control. The second execution form is a form that is executed one by one, such as an application program that mainly controls a robot. In this case, the delay amount differs depending on whether the first field device that serves as a reference for the coordinated action and the second field device that coordinates the action therewith are, for example, devices that operate in accordance with the first execution form or devices that operate in accordance with the second execution form. Therefore, by determining the correction coefficient based on a combination of the types of the first field device and the second field device, appropriate prediction can be made.
[0018] In addition, the processing unit may also include: a first processing unit, which is configured to calculate the instruction value for controlling the field device in each control cycle by executing a program following the first execution form in fixed-cycle communication; and a second processing unit, which is configured to calculate the instruction value for controlling the field device in each control cycle according to an intermediate code generated by executing the program following the second execution form and interpreting at least a part of the program by an interpreter, and even if the execution of the program following the first execution form by the first processing unit is used as the starting point, the instruction value for controlling the field device can be calculated, and the instruction values calculated by the first processing unit and the second processing unit are sent via the interface unit in each control cycle.
[0019] By transmitting the command values calculated by the first processing unit and the second processing unit at each control cycle in the above-mentioned fixed cycle communication, for example, the motion axes and the robot can be collectively controlled, and synchronous control of the motions can be easily performed.
[0020] Alternatively, 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 sent to the first field device, and the prescribed correction coefficient may be determined according to whether the position of the first field device in the first cycle is the feedback value or the command value. Specifically, the above-mentioned value may be used as the position of the first field device in the first cycle. However, the delay amount may differ depending on which value is used. Therefore, by determining the correction coefficient according to which value is used, appropriate prediction can be performed.
[0021] Furthermore, the fixed-cycle communication may be communication conforming to the EtherCAT (registered trademark) standard. For example, by adopting such a standard, a field network that performs the above-mentioned processing can be constructed.
[0022] Effects of the Invention
[0023] It is possible to easily perform synchronous control of the actions of on-site equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] [ Figure 1 ] is a diagram showing the schematic structure of a control system including an integrated controller.
[0025] [ Figure 2 ] is a functional block diagram that visualizes the functions of the integrated controller.
[0026] [ Figure 3 ] is a diagram showing the flow of processing performed in the integrated controller according to the control cycle.
[0027] [ Figure 4 ] is a diagram for illustrating an example of communication between a control device and field equipment.
[0028] [ Figure 5 ] is a diagram for illustrating an example of coordinated action of field devices.
[0029] [ Figure 6 ] is a diagram for illustrating an example of delay in communication between a control device and field equipment, and coordinated actions of the field equipment.
[0030] [ Figure 7 ] is a diagram for explaining the correction coefficient.
[0031] [ Figure 8 ] is a flowchart showing an example of correction processing. DETAILED DESCRIPTION
[0032] <Application Examples>
[0033] based on Figure 1 as well as Figure 2 An application example of the control device according to the embodiment will be described. Figure 1 is a schematic structural diagram of a control system 1 to which the control device 100 is applied. Figure 2 The figure is a diagram showing an image of a functional unit formed in the control device 100 .
[0034] The control device 100 is equivalent to an industrial controller that controls various equipment, devices and other control objects. The control device 100 is a computer that performs control operations as described below. The control device 100 can also be connected to various field devices via the field network 2. Field devices include actuators that give certain physical effects to manufacturing equipment or production lines (hereinafter collectively referred to as "fields"), and input and output devices that exchange information with the field. Figure 1 In the figure, as field equipment, a robot 210, a servo driver 220, and a motor 222 are exemplified. The servo driver 220 drives the motor 222 according to the output data from the control device 100 (for example, "command values" such as position commands or speed commands). In addition, as the robot 210, a parallel robot, a SCARA robot, and a multi-joint robot can be exemplified. In this way, the control device 100 is configured to be able to uniformly control the robot 210, the servo driver 220, and the motor 222, and its details will be described later.
[0035] The control device 100 exchanges data with one or more field devices via the field network 2 or the like. Generally, a "field network" is also called a "field bus", but for simplicity of description, it is collectively referred to as a "field network" in this application. The control device 100 performs processing (input processing) of collecting data (hereinafter, also referred to as "input data") collected or generated in various field devices, processing (calculation processing) of generating data such as instructions for field devices (hereinafter, also referred to as "output data"), and processing (output processing) of sending the generated output data to the target field device.
[0036] Here, the field network 2 preferably adopts a bus or network that performs fixed-cycle communication and guarantees the arrival time of data. As a bus or network that performs such fixed-cycle communication, EtherCAT (registered trademark) and the like are known. Moreover, the data exchanged between the control device 100 and the field device via the field network 2 is updated in an extremely short cycle of the order of several 100 μsec to the order of several 10 msec. In addition, the update process of such exchanged data is also called input / output refresh processing.
[0037] In addition, the control device 100 is also connected to other devices via the upper network 6. The upper network 6 may also adopt Ethernet (registered trademark) or EtherNet / IP (registered trademark) as general network protocols. More specifically, one or more server devices 10 may also be connected to the upper network 6. As the server device 10, a database system, a manufacturing execution system (MES: Manufacturing Execution System), etc. are envisioned. The manufacturing execution system obtains information from the manufacturing devices and equipment of the controlled object, monitors and manages the overall production, and can also process order information, quality information, shipping information, etc. Without being limited to this, a device that provides information system services may also be connected to the upper network 6.
[0038] Here, based on Figure 2 The structure of the control device 100 is described. The control device 100 is a computer that performs the specified control operation as described above, and has a processor and memory required for the control operation. The processor is composed of a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a GPU (Graphics Processing Unit), etc. As a processor, a structure with multiple cores can be adopted, and multiple processors can also be configured. As the memory, it is composed of volatile storage devices such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory), non-volatile storage devices such as HDD (Hard Disk Drive) and SSD (Solid State Drive:), etc. In addition, the processor realizes the control corresponding to the control object and the various processing described later by reading and executing various programs stored in the memory. In the memory, in addition to the system program for realizing the basic functions, the user program (IEC program 51 and application program 52) made according to the manufacturing device or equipment of the control object is also stored.
[0039] In addition, the IEC program 51 in the present application refers to a program that is scanned as a whole each time it is executed, and calculates one or more instruction values each time it is executed, and typically includes a program consisting of one or more instructions described in accordance with the international standard IEC61131-3 specified by the International Electrotechnical Commission (IEC). The IEC program 51 includes commands for sequence control and motion control. This IEC program 51 corresponds to an execution form in which all programs are executed (scanned) in each control cycle, and is suitable for control that requires immediacy and high speed. On the other hand, the application program 52 in the present application is a control program for using a robot to perform specific processing or actions, and includes a program consisting of one or more instructions for implementing a robot control application, which is basically distinguished from the IEC program 51. As an example, the application program 52 related to robot control adopts an interpreter method that is described in a robot language and executes one line at a time.
[0040] Moreover, if Figure 2 As shown, the control device 100 includes an IEC program processing unit 40, a lower network interface 60, an upper network interface 20, a control application processing unit 30, a prediction unit 70, and a common memory 71. The lower network interface 60 mediates data exchange between the IEC program processing unit 40 and the control application processing unit 30 and the field device connected via the field network 2. The upper network interface 20 mediates data exchange 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. For example, 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 also send an application program and recipe information (parameters and other information suitable for production) for operating the control application to the control device 100.
[0041] The IEC program processing unit 40 executes (scans) the IEC program 51 in each predetermined control cycle to calculate one or more command values. That is, the IEC program processing unit 40 calculates the command value in each control cycle according to the IEC program 51. In addition, in the present application, the IEC program 51 is executed in order to control the specified device including the motor 222. Moreover, the action processing unit 42 provides a function of calculating the command value in each control cycle according to the action command included in the IEC program 51. That is, the action command included in the IEC program 51 includes a command indicating a behavior across multiple control cycles (for example, a command for causing the output of the specified device composed of the motor 222 to draw a certain trajectory). When such an action command is executed, the action processing unit 42 calculates the command value in each control cycle according to the instruction content of the executed action command. That is, the action processing unit 42 implements the action indicated by the action command by outputting the command value to the above-mentioned specified device in each control cycle. In addition, the action processing unit 42 is equivalent to the "first processing unit" of the present invention.
[0042] Next, the control application processing unit 30 calculates the command value for controlling the control application based on the application 52 and the recipe information. In addition, in the present application, the application 52 is executed by the control application processing unit 30 in order to control the robot 210. The control application processing unit 30 calculates and outputs the command value for the control application in synchronization with the calculation and output of the command value of the IEC program processing unit 40. That is, the control application processing unit 30 performs the calculation processing of the command value in synchronization with the calculation processing of the IEC program processing unit 40. In addition, the synchronization processing of the IEC program processing unit 40 and the control application processing unit 30 will be described later. In order to realize the calculation of the command value synchronized with the calculation processing of the command value of the IEC program processing unit 40, the control application processing unit 30 includes an action processing unit 32, a buffer 33 and an interpreter 34.
[0043] The interpreter 34 has a buffer 33 for successively interpreting at least a part of the application 52 to generate an intermediate code, and storing the generated intermediate code. The intermediate code in the present application is a concept including commands for calculating instruction values in each control cycle, and may also include one or more commands, or one or more functions. Moreover, the motion processing unit 32 calculates the instruction value in each control cycle according to the intermediate code generated in advance by the interpreter 34 and stored in the buffer 33. Generally speaking, since the commands (codes) recorded in the application 52 are executed one by one, the calculation cycle of the instruction value cannot be guaranteed, but in the disclosure of the present application, by using the intermediate code in this way, the motion processing unit 32 can calculate the instruction value in each control cycle. The commands recorded in the intermediate code can also use the coordinate system corresponding to each control application. In addition, the motion processing unit 32 is equivalent to the "second processing unit" of the present invention. In addition, the motion processing unit 32 and the motion processing unit 42 are equivalent to the "processing unit" of the present invention.
[0044] Furthermore, in order to share data between the IEC program processing unit 40 and the control application processing unit 30, a common memory 71 is provided in the control device 100. In the disclosure of the present application, a part or all of the processing results of the control application processing unit 30 are stored in the common memory 71, and the IEC program processing unit 40 can refer to the data stored in the common memory 71. In addition, data can also be written from the IEC program processing unit 40 to the common memory 71, so that the data written from the IEC program processing unit 40 can be referred to by the interpreter 34 and the action processing unit 32. In addition, the prediction unit 70 can also read and write data to the common memory 71.
[0045] Here, as described above, the robot 210 is controlled by the motion processing unit 32 using the intermediate code generated by the interpreter 34, but as another form of controlling the robot 210, the motion processing unit 32 may control the robot 210 by using the execution of the IEC program 51 as a starting point. In this case, the IEC program 51 includes control instructions (motion instructions) for the robot 210, and first, when the IEC program 51 is executed by the IEC program processing unit 40, the control instructions for the robot 210 included therein are handed over to the motion processing unit 32, and the robot 210 is controlled based on the control instructions.
[0046] As described above, the control device 100 is configured to control the robot 210 according to both the IEC program 51 and the application program 52 having different execution formats. Therefore, the control system 1 for realizing user requirements can be flexibly constructed according to the characteristics of each program.
[0047] In addition, the prediction unit 70 performs prediction processing for correcting the delay of the action for multiple field devices that should coordinate the action. Assuming that the command value for the action of other field devices (also called the action slave device) that should coordinate with the action master device is calculated based on the value representing the current position or posture of the field device that serves as the reference of the action (also called the action master device), when the action slave device acts based on the control instruction containing the command value, the action master device may have further moved or changed its posture. Such a delay in action is caused by the difference in communication cycle and the time required for data processing. Therefore, the prediction unit 70 predicts the position or posture of the action master device at the time point when the action slave device acts, and the motion processing unit 32 and the motion processing unit 42 send the command value based on the predicted value to the action slave device. In this way, the prediction unit 70 performs advance correction to advance the timing of the action of the action slave device relative to the action of the action master device, thereby enabling the user using the control device 100 to easily perform synchronous control of the action. In addition, the control device 100 controls the master device and the slave device in a unified manner. In particular, the control device 100 can control the field devices according to both the IEC program 51 and the application program 52 , and thus can perform unified control even for various combinations of master devices and slave devices.
[0048] <Synchronous execution of programs>
[0049] In the control device 100, the synchronous execution of the IEC program 51 and the application program 52 is realized. The interpreter 34 of the control application processing unit 30 successively executes the application program 52 in a cycle longer than the control cycle, for example, a cycle (control application synchronization cycle T2) twice the control cycle. However, the action processing unit 42 of the IEC program processing unit 40 and the action processing unit 32 of the control application processing unit 30 both calculate the instruction value in each of the same control cycles. Therefore, the output of the instruction value from the control device 100 is performed synchronously with a predetermined control cycle. In this way, the IEC program processing unit 40 and the control application processing unit 30 each have an action processing unit for continuously controlling the action of the actuator, and these action processing units synchronously calculate the instruction value, thereby being able to execute both the control according to the IEC program 51 and the control according to the application program 52 synchronously with the control cycle, thereby realizing precise control in units of control cycles.
[0050] Next, based on Figure 3 The details of the execution timing of the IEC program 51 and the application program 52 in the control device 100 will be described. Figure 3 1 is a diagram showing an example of the execution timing of the program in the control device 100. In addition, in the control device 100, considering the resources of the processor, a high priority task ( Figure 3The upper part of the processing) and low priority tasks with low priority ( Figure 3 Specifically, the execution of the lower network interface 60, the IEC program processing unit 40 and its action processing unit 42, and the execution of the action processing unit 32 of the control application processing unit 30 are set as high priority tasks, and the execution of the interpreter 34 of the control application processing unit 30 is set as a low priority task.
[0051] That is, the input / output refreshing process B60 associated with the lower network interface 60, the execution process B40 of the IEC program 51, the command value calculation process B42 performed by the action processing unit 42 according to the IEC program 51, the command value calculation process B32 performed by the action processing unit 32 according to the application program 52, and the command value calculation process B32' performed by the action processing unit 32 starting from the IEC program 51 are executed as high priority tasks. On the other hand, the process B34 of sequentially interpreting the application program 52 is executed as a low priority task. In addition, among the high priority tasks in one control cycle T1, only one of the calculation process B32 and the calculation process B32' is performed.
[0052] Here, the high priority task is repeatedly executed in each predetermined control cycle T1. The low priority task is executed each time during the period when the high priority task is not executed in each control cycle. That is, the execution time of the high priority task is allocated to each control cycle, and the low priority task is executed at a time other than the execution time of the high priority task.
[0053] First, the high priority task is explained. When each control cycle arrives, after executing the input / output refresh processing B60, the entire IEC program 51 is executed (scanned) by the IEC program processing unit 40, and one or more instruction values for sequence control are calculated (execution processing B40). In addition, the action processing related to the action command contained in the IEC program 51 is executed by the action processing unit 42, and one or more instruction values for the action command are calculated (execution processing B42). Furthermore, the action processing unit 32 of the control application processing unit 30 prepares the action command for controlling the robot 210 according to the intermediate code stored in the buffer 33 (execution processing B32), or prepares the action command for controlling the robot 210 contained in the IEC program 51 (execution processing B32'). Whether to execute the execution processing B32 or the execution processing B32' is determined based on a predetermined reference. Hereinafter, the same processing is repeated for each control cycle. In addition, the timing at which the motion processing unit 32 reads the intermediate code from the buffer 33 may not be each control cycle. This is because, when the read intermediate code includes a command that can calculate a command value over a plurality of control cycles T1, the intermediate code can be read once in the plurality of control cycles T1.
[0054] In this way, when the execution of the high priority task in a certain control cycle is completed, a set of command values for sequence control related to the motor 222 and the like, command values for motion control thereof, and command values for control applications related to the robot 210 are prepared. These command values are basically reflected to the field side when the next control cycle arrives. That is, the IEC program processing unit 40 and the control application processing unit 30 calculate the command values corresponding to the input data in the same control cycle, so that output synchronized with the input can be achieved.
[0055] On the other hand, regarding the low priority task, the interpreter 34 of the control application processing unit 30 executes the application 52 one by one. That is, the interpreter 34 reads and analyzes the application 52 at a low priority. The intermediate codes generated by the interpreter 34 through the analysis of the application 52 are stored in the buffer 33 one by one while taking into account the capacity of the buffer 33. The intermediate codes stored in the buffer 33 are sequentially referred to by the action processing unit 32 of the control application processing unit 30 for the generation of the instruction value in the calculation process B32. At this time, the interpreter 34 redundantly generates the intermediate codes of the calculation cycle of the high priority task, that is, the integer multiple of the control cycle in advance, so that the instruction value for the control application can be calculated in each control cycle without affecting the processing of the action processing unit 32.
[0056] In addition, the interpreter 34 temporarily stops the interpretation of the application 52 before the arrival of the predetermined control application synchronization cycle (integer multiple of the control cycle). At the timing of the temporary stop, data synchronization is performed between the IEC program processing unit 40 and the control application processing unit 30, thereby sharing matching data between the two. In this way, the interpreter 34 updates the data shared with the IEC program processing unit 40 in each synchronization cycle. Along with the update of the shared data, the input data and output data obtained from the field side can also be updated (data synchronization). Thus, on the control application processing unit 30 side, the data obtained by the IEC program processing unit 40 can also be used to control the robot 210. The control application synchronization cycle can be of any length as long as it is set to an integer multiple of the control cycle. It is appropriately set according to the accuracy of control required by the control application, etc.
[0057] <Synchronous control of field devices>
[0058] Figure 4This is a diagram for explaining an example of communication between a control device and field equipment. Communication only needs to be performed at a fixed period, but in this embodiment, communication is performed in accordance with the EtherCAT standard. The control device 100 functions as a controller of the field network 2 to control field equipment such as a robot 210 or a servo driver 220. In addition, each device can be connected in a daisy chain, star, ring, etc., but is assumed to be connected in a daisy chain here. Then, in the control device 100, information in accordance with the prescribed standard is stored in the data portion of the Ethernet frame, and is sent to the field equipment connected in series in sequence ( Figure 4 :S1, S2). In addition, the Ethernet frame is returned at the terminal of the field device and returns to the control device 100 in the opposite direction ( Figure 4 :S3, S4). Thus, the input and output processing of one cycle is completed. In addition, each field device performs input and output processing on the Ethernet frame to be sent and received in real time in each cycle. In addition, each field device is pre-assigned with the bit position and bit width of the data to be input and output by the device. The motion processing unit 32 and the motion processing unit 42 store the command value to each field device in the Ethernet frame according to the application program 52 and the IEC program 51 respectively. At this time, the command value corrected based on the prediction result of the prediction unit 70 is used.
[0059] Figure 5 FIG. 1 is a diagram for explaining an example of coordinated operation of field devices. Figure 5 In the example of FIG. 2 , the motor 222 operates the conveyor 8. In addition, the workpiece 9 is placed on the conveyor 8, and the workpiece 9 is conveyed by the operation of the motor 222. In addition, the robot 210 performs a predetermined operation on the workpiece 9.
[0060] For example, in the first cycle ( Figure 5 In the second cycle (C1), the shaft position of the motor 222 is fed back from the servo driver 220 to the control device 100. In addition, the speed of the motor 222 can also be fed back. Figure 5 : C2), the control device 100 predicts a third cycle ( Figure 5 : C3), and based on the predicted position, the target position of the robot 210 is determined, and a control command based on the target position is sent to the robot 210. Then, in the third cycle, the robot 210 operates based on the target position. In the third cycle, the workpiece 9 is conveyed by the conveyor 8 to the predicted position that is ahead of the position in the second cycle, and a plurality of field devices operate synchronously.
[0061] Figure 6 This is a diagram for explaining an example of delay in communication between a control device and a field device, and in cooperative operation of the field device. Figure 6 Indicates the processing performed by the control device and the field equipment. Figure 6 The master device and slave device shown are both field devices, which are equivalent to the action master device and the action slave device, respectively. In addition, the action master device is the servo driver 220 that controls the motor 222, and the action slave device is the robot 210. "I / O" indicates input and output refresh processing, for example, equivalent to Figure 3 "UPG" indicates the execution of the user program. "MC" indicates the operation processing of the motion control, for example, Figure 3 B42. "RC" indicates the operation processing of robot control, for example, Figure 3 B32 of EtherCAT. "ECAT" indicates the communication processing in EtherCAT. "IN" and "OUT" respectively indicate the input refresh and output refresh of the field device in EtherCAT, which is equivalent to Figure 4 The input and output processing of Ethernet frames shown in FIG. 1 and FIG. 2 show the processing of calculating the trajectory of the robot.
[0062] In cycle C11, data indicating the current position is input in "IN" of the master device for feedback. In addition, in cycle C12, data is fed back to the control device 100 in "ECAT" of the master device and "I / O" of the control device, and control instructions for field devices are generated in "MC" and "RC" of the control device. Furthermore, in cycle C13, control instructions are sent in "I / O" of the control device and "ECAT" of the slave device, read in "OUT" of the slave device, and the trajectory of the movement of the robot 210 is calculated in "Trajectory". Thereafter, in cycle C14, the robot 210 moves according to the calculated trajectory. In addition, processing is also performed in parallel in unexplained blocks.
[0063] like Figure 6 As shown, the robot 210 operates in cycle C14, which is delayed compared to cycle C11 in which the servo driver 220 writes the current position for feedback and cycle C12 in which the command value is calculated by the motion control operation processing of the servo driver 220. In addition, although not shown in the figure, the magnitude of the delay varies depending on whether the master device is a servo driver or a robot, whether the slave device is a servo driver or a robot, and the combination of the types of the master device and the slave device. In other words, the operating master device and the slave device are field devices of the type that operate by executing a program in an execution form that is executed as a whole each time, or field devices of the type that operate based on an intermediate code generated by an interpreter according to at least a part of the program in an execution form that is executed successively, and the communication cycle and processing time are different, so the magnitude of the delay also varies. Therefore, the prediction unit 70 calculates the predicted position corrected for such a delay.
[0064] The predicted position can be calculated using the shaft position (current position) and the operating speed of the motor 222. For example, the predicted position can be obtained by the following formula (1).
[0065] Predicted position = current position + (current speed × correction factor)…(1)
[0066] The current position may use either the value fed back from the servo driver 220 or the command value indicated in the control command to the servo driver 220. The current speed may be fed back from the servo driver 220 or calculated using the data column of the current position in the past cycle. The correction coefficient is a specified value and can be set according to the combination of the categories of the master device of the action and the slave device of the action. For example, the correction coefficient may be determined in correspondence with the combination of the categories of the master device of the action and the slave device of the action, such as a robot or a motor. In addition, different correction coefficients may be used depending on whether the feedback position or the control command position is used as the current position of the master device.
[0067] Figure 7 is a diagram for explaining the correction coefficient. In addition, an "action axis / axis group" corresponds to one or more motors and is an example of a field device that operates by following a program in an execution format that is executed as a whole each time. In addition, a "robot" is an example of a field device that operates based on an intermediate code generated by an interpreter based on at least a part of a program in an execution format that is executed sequentially. Figure 7 In the example, the amount of the delay cycle is determined for the combination of the type of the master device of the action and the type of the slave device of the action. In addition, different values are determined in the case of using the feedback position and the control command position as the current position of the master device. In addition, with respect to the robot, different delay cycles can also be determined according to the robot amplifier. In addition, different delay cycle amounts can also be determined for the case of controlling the robot 210 according to the IEC program 51 and the application program 52 in different execution forms. By using Figure 7 The correction coefficient corresponding to the delay period shown can correct the communication delay and perform synchronous control of the field device. For example, the correction coefficient can be predetermined so that the correction coefficient becomes larger according to the size of the delay period.
[0068] <Correction Processing>
[0069] Figure 8 1 is a flowchart showing an example of the correction process. When the control device 100 generates and sends a control command to a field device that should coordinate an action, Figure 8 First, the prediction unit 70 obtains the current position of the main device of the action ( Figure 8:S101). In this step, as the current position, a value fed back from the master device may be obtained, or a command value indicated in a control command to the master device may be obtained. In addition, when the master device is a robot, the current posture of the master device (a combination of the positions of a plurality of motors of the robot) may also be obtained as the current position.
[0070] Then, the prediction unit 70 predicts the arrival position of the master device ( Figure 8 :S102). In this step, the prediction unit 70 predicts the arrival position of the master device at the action time point of the slave device. The arrival position can be calculated using the above-mentioned formula (1), for example. In addition, in this step, the correction amount can be changed based on the combination of the type of the master device and the type of the slave device, or the correction amount can be changed based on whether the current position of the master device is a value fed back from the master device or a value indicated in the control instruction to the master device.
[0071] In addition, the action processing unit 32 or the action processing unit 42 determines the command value for the slave device based on the predicted arrival position, and sends it to the slave device ( Figure 8 :S103) In this step, for example, the command value is determined with the arrival position of the master device as the target to make the slave device operate. On the other hand, the slave device that receives the control command including the command value operates according to the command value.
[0072] In addition, the control device 100 determines whether to end the processing ( Figure 8 :S104). In this step, for example, it is determined whether all the actions of the field device according to the specified user program have been completed. If it is determined that it has not been completed (S104: No), the process returns to S1 to continue. On the other hand, if it is determined that it has been completed (S104: Yes), the control device 100 ends the process.
[0073] As described above, the control device 100 can correct the delay of communication and operation from the time when the control command based on the current position reaches the field device and operates in the system that performs fixed-cycle communication. In particular, the control device 100 can synchronize the application program 52 and the IEC program 51 for processing, so even if the types of the operating master device and the operating slave device are different, such as a motor and a robot, the delay correction can be performed uniformly.
[0074] The above embodiment is described, but the above control device is an example, and the control device of the present invention is not limited to the above structure. The structure of the described embodiment can be changed or combined as much as possible within the scope of the subject or technical idea of the present invention.
[0075] <Additional Note 1>
[0076] A control device (100) causes a plurality of field devices (210, 220) to coordinate operations according to a predetermined program via a network (2) that performs fixed-cycle communications, the control device comprising:
[0077] A prediction unit (70) for calculating, based on the position of the first field device in the first cycle, the position of the first field device in a second cycle later than the first cycle and operating according to a first program;
[0078] A processing unit (32, 42) determines a first instruction value for an action of the first field device based on the first program, and sends the first instruction value to the first field device via an interface unit for communicating with the plurality of field devices, and determines a second instruction value for an action of a second field device that should coordinate actions with the first field device based on the predicted position and a second program, and sends the second instruction value to the second field device via the interface unit (60).
[0079] Description of symbols
[0080] 1: control system; 2: field network; 6: upper network; 10: server device; 30: control application processing unit; 40: IEC program processing unit; 51: IEC program; 52: application program; 70: prediction unit; 210: robot; 220: servo drive; 222: motor.
Claims
1. A control device that causes a plurality of field devices to perform coordinated operations according to a predetermined program via a network that performs fixed-cycle communications, the control device comprising: a prediction unit that calculates a position of the first field device that operates according to a first program in a second cycle later than the first cycle based on the position of the first field device in the first cycle; and a processing unit that determines a first instruction value for causing the first field device to operate according to the first program, and sends the first instruction value to the first field device via an interface unit for communicating with the plurality of field devices, and determines a second instruction value for causing a second field device that should perform a coordinated operation with the first field device to operate according to the position calculated by the prediction unit and a second program, and sends the second instruction value to the second field device via the interface unit, the prediction unit calculates the position of the first field device in the second cycle by adding a value obtained by multiplying the operating speed of the first field device by a predetermined correction coefficient to the position of the first field device in the first cycle, One of the first program and the second program is a program that follows a first execution form in which the entire program is executed each time, and the other is a program that follows a second execution form in which the program is executed sequentially. The predetermined correction coefficient is determined based on a combination of types of the first field device and the second field device, including a type of device that operates according to a program that complies with the first execution form and a type of device that operates according to a program that complies with the second execution form.
2. The control device according to claim 1, wherein: The processing unit comprises: a first processing unit configured to execute a program conforming to the first execution format for each control cycle in the fixed cycle communication to calculate a command value for controlling the field device; and the second processing unit being configured to calculate a command value for controlling the field device in each of the control cycles according to an intermediate code generated by executing a program conforming to the second execution form and interpreting at least a part of the program by an interpreter, and being configured to calculate the command value for controlling the field device even when the first processing unit executes the program conforming to the first execution form as a starting point, The command value calculated by the first processing unit and the second processing unit is transmitted via the interface unit at each control cycle.
3. The control device according to claim 1, wherein: The position of the first field device in the first cycle is a feedback value fed back from the first field device, or a command value sent to the first field device. The predetermined correction coefficient is further determined according to whether the position of the first field device in the first cycle is the feedback value or the transmitted command value.
4. The control device according to claim 2, wherein: The position of the first field device in the first cycle is a feedback value fed back from the first field device, or a command value sent to the first field device. The predetermined correction coefficient is further determined according to whether the position of the first field device in the first cycle is the feedback value or the transmitted command value.
5. The control device according to any one of claims 1 to 4, wherein: The fixed-cycle communication is communication compliant with the EtherCAT (registered trademark) standard.
