Control device, program execution method, and program

The control device addresses precision issues in motion processing and robot control by allowing values from the motion processing unit to be referenced within the same control cycle, reducing time lag and data fluctuations, thereby improving control accuracy.

JP7600716B2Active Publication Date: 2024-12-17OMRON CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021011174
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-01-27
Publication Date
2024-12-17
Estimated Expiration
2041-01-27

AI Technical Summary

Technical Problem

Existing control systems face challenges in achieving precise motion processing and robot control due to time lags and fluctuations in data updates during the execution of multiple user programs.

Method used

A control device that includes a first program execution unit for sequence instructions and a motion processing unit, with the configuration allowing values calculated by the motion processing unit to be referenced within the same control cycle during the execution of a second user program, thereby reducing time lag and data fluctuations.

Benefits of technology

This configuration enables more precise control by ensuring that values calculated by the motion processing unit are immediately available for the subsequent execution of the second user program, enhancing the accuracy of robot control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007600716000001
    Figure 0007600716000001
  • Figure 0007600716000002
    Figure 0007600716000002
  • Figure 0007600716000003
    Figure 0007600716000003
Patent Text Reader

Abstract

To provide a technique which allows collaborative control of motion processing and robot control to be performed with higher accuracy.SOLUTION: A control device for controlling a control object includes: a first program execution unit which executes a first user program including sequence instructions; and a second program execution unit which executes a second user program for controlling a robot. The control device is configured so as to repeat the execution of the first user program, the execution of processing in a motion processing unit, and the execution of the second user program in this order at intervals of a predetermined control period. The control device is configured so as to, in a same control period, allow a value calculated by the execution of processing in the motion processing unit to be referenced in the following execution of the second user program.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a control device, a program execution method, and a program. [Background technology]

[0002] Factory automation (FA) technology using control devices such as programmable controllers (PLCs) is becoming widespread in various production sites. With the recent advances in information and communication technology (ICT), control devices are now capable of controlling not only conventional sequence control and motion control, but also robots, machine tools, and the like.

[0003] For example, Japanese Patent Application Laid-Open No. 2019-036043 (Patent Document 1) discloses a configuration in which control calculations according to multiple types of programs with different execution formats are realized by a single control device. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2019-036043 A Summary of the Invention [Problem to be solved by the invention]

[0005] For example, in an application where a robot picks up a workpiece moving on a conveyor belt and places it in a designated position, the robot needs to move in accordance with the speed of the conveyor belt.

[0006] An object of the present invention is to provide a technique that can perform coordinated control between motion processing and robot control with higher accuracy. [Means for solving the problem]

[0007] According to one aspect of the present invention, there is provided a control device for controlling a control target. The control device includes a first program execution unit that executes a first user program including sequence instructions, a motion processing unit, and a second program execution unit that executes a second user program for controlling a robot. The control device is configured to repeat the execution of the first user program, the execution of processing by the motion processing unit, and the execution of the second user program in this order for every predetermined control period. The control device is configured to allow a value calculated by the execution of processing by the motion processing unit to be referenced in the subsequent execution of the second user program within the same control period.

[0008] According to this configuration, the values ​​calculated by the execution of the processing of the motion processing unit can be referenced in the execution of the subsequent application program within the same control cycle, so that when the control target is controlled according to the second user program by referring to the values ​​related to the processing of the motion processing unit, the time lag and fluctuation of data updates can be reduced, thereby realizing more accurate control.

[0009] The execution of the process by the motion processing unit may include a process of retaining a value to be referenced in the execution of the second user program according to a predetermined setting. With this configuration, the value to be referenced in the execution can be directly passed to the second user program.

[0010] The execution of the second user program may include a process of referencing values ​​held in a previously executed process of the motion processing unit. With this configuration, it is possible to refer to necessary values ​​in the execution of the second user program.

[0011] The execution of the process by the motion processing unit may include a process of storing a value to be referenced in the execution of the second user program in a shared area according to a predetermined setting. With this configuration, the value to be referenced in the execution can be passed to the second user program via the shared area.

[0012] The execution of the second user program may include a process of referencing values ​​stored in the shared area during the execution of a previously executed process of the motion processing unit. With this configuration, the execution of the second user program can refer to necessary values ​​from the shared area.

[0013] The predetermined settings may include information that associates variables defined for the processing of the motion processing unit with variables defined in the second user program. With this configuration, it is possible to set in advance values ​​that are required in the second user program among values ​​referenced in the processing of the motion processing unit.

[0014] The processing by the motion processing section may include a process of calculating a command value for a target device. With this configuration, the command value calculated by executing the processing by the motion processing section can be referenced in the second user program.

[0015] Before the first user program is executed, a process for acquiring a current value from the target device may be executed. With this configuration, it is possible to acquire information required for the current control cycle before the process is executed.

[0016] According to another aspect of the present invention, there is provided a program execution method in a control device for controlling a controlled object. The program execution method includes repeating the steps of executing a first user program including sequence instructions for each predetermined control period, executing a motion process following the execution of the first user program, and executing a second user program following the execution of the motion process. The step of executing the second user program includes a step of referring to a value calculated by the execution of the motion process within the same control period.

[0017] According to yet another aspect of the present invention, there is provided a program directed to a control device for controlling a control target. The program causes the control device to execute, for each predetermined control period, repeating the steps of: executing a first user program including sequence instructions; executing a motion process following the execution of the first user program; and executing a second user program following the execution of the motion process. The step of executing the second user program includes a step of referring to a value calculated by the execution of the motion process within the same control period. Effect of the Invention

[0018] According to the present invention, it is possible to perform coordinated control between motion processing and robot control with higher accuracy. [Brief description of the drawings]

[0019] [Figure 1] 1 is a schematic diagram showing an example of a system configuration of a control system according to an embodiment of the present invention; [Diagram 2] 1 is a diagram illustrating an application example of a control device according to an embodiment of the present invention. [Diagram 3] 2 is a schematic diagram illustrating an example of a hardware configuration of a control device that constitutes the control system according to the present embodiment. FIG. [Figure 4] FIG. 2 is a schematic diagram showing an example of a hardware configuration of a robot controller that constitutes the control system according to the present embodiment. [Diagram 5] FIG. 2 is a schematic diagram showing an example of a hardware configuration of a servo driver that constitutes the control system according to the present embodiment. [Figure 6] FIG. 2 is a schematic diagram illustrating an example of a hardware configuration of a support device that constitutes the control system according to the present embodiment. [Figure 7] FIG. 2 is a schematic diagram showing a configuration related to a program execution environment in the control device according to the present embodiment. [Figure 8] FIG. 4 is a schematic diagram showing a program execution period in the control device according to the present embodiment. [Figure 9]It is a schematic diagram showing an example of a method for reflecting the processing result of the motion processing unit in the execution of the application program execution unit in the control device according to the present embodiment. [Figure 10] It is a schematic diagram showing another example of a method for reflecting the processing result of the motion processing unit 132 in the execution of the application program execution unit in the control device according to the present embodiment. [Figure 11] It is a schematic diagram showing an example of a user interface screen provided by the support device according to the present embodiment. [Figure 12] It is a schematic diagram showing another example of a user interface screen provided by the support device according to the present embodiment. [Figure 13] It is a schematic diagram showing still another example of a user interface screen provided by the support device according to the present embodiment. [Figure 14] It is a schematic diagram showing an example of the application program 160 executed by the control device according to the present embodiment.

Embodiments for Carrying Out the Invention

[0020] Embodiments of the present invention will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals and their description will not be repeated.

[0021] <A. Application Example> First, a system configuration example of the control system 1 according to the present embodiment will be described.

[0022] FIG. 1 is a schematic diagram showing a system configuration example of the control system 1 according to the present embodiment. FIG. 1 shows a configuration example in which the robot 200 picks up the workpiece 2 flowing on the conveyor 30 and places it at a predetermined position. The robot 200 picks up the workpiece 2 while moving at substantially the same speed as the conveyor 30. Therefore, the target behavior of the robot 200 is calculated according to the moving speed of the conveyor 30.

[0023] 1, a control system 1 includes a control device 100 for controlling a control target, a robot controller 250, a servo driver 350, and a remote IO device 500. These devices are connected via a field network 10 so as to be able to exchange data.

[0024] The control device 100 periodically exchanges data with devices connected to the field network 10 and executes processes as described below. The control device 100 may typically be realized by a PLC (Programmable Logic Controller).

[0025] The robot controller 250 is responsible for controlling the robot 200. More specifically, the robot controller 250 functions as an interface with the robot 200, and outputs command values ​​for driving the robot 200 in accordance with commands from the control device 100, and also acquires status information of the robot 200 and outputs the information to the control device 100.

[0026] The robot 200 may be any robot, such as a vertical articulated robot, a horizontal articulated (SCARA) robot, a parallel link robot, or a Cartesian robot.

[0027] The servo driver 350 is responsible for controlling the servo motor 300 that drives the conveyor 30, and receives encoder pulses from an encoder 310 that is mechanically connected to the conveyor 30. More specifically, the servo driver 350 drives the servo motor 300 in accordance with commands from the control device 100, and counts and outputs encoder pulses from the encoder 310 to the control device 100. The servo driver 350 counts the number of pulses received from the encoder 310. The moving speed of the conveyor 30 can be calculated from the change in the count number of the servo driver 350 (the number of increments / decrements per unit time).

[0028] EtherCAT (registered trademark) or EtherNet / IP, which are protocols for industrial networks, can be used for the field network 10. When EtherCAT is adopted as the protocol, data can be updated between the control device 100 and devices connected to the field network 10 at regular intervals of, for example, several hundred microseconds to several milliseconds.

[0029] The control system 1 further includes an image processing device 450 connected to a camera 400 that includes the conveyor 30 in its field of view, a display device 700, and a server device 800. These devices are connected to the control device 100 via a higher-level network 20 so as to be able to exchange data with the control device 100. For the higher-level network 20, an industrial network protocol such as EtherNet / IP can be used.

[0030] The image processing device 450 recognizes the position of the workpiece 2 included in the image captured by the camera 400, and outputs the recognition result to the control device 100, etc. When the camera 400 receives an imaging trigger from the remote IO device 500, it performs imaging.

[0031] A support device 600 may be connected to the control device 100 for installing user programs (an IEC program 150 and an application program 160, which will be described later) executed by the control device 100 and for performing various settings.

[0032] Fig. 2 is a diagram showing an application example of the control device 100 according to the present embodiment. With reference to Fig. 2, in the control device 100, processing is executed in the order of the IEC program execution unit 130, the motion processing unit 132, and the application program execution unit 134. However, prior to the processing of the IEC program execution unit 130, the motion processing unit 132 and the application program execution unit 134 include processing for acquiring input data to be used in the current control cycle T1.

[0033] More specifically, the motion processing unit 132 acquires a feedback value (current value) as input processing (IN). Although not shown, the application program execution unit 134 also acquires necessary input data as input processing (IN).

[0034] Subsequent to the execution of the IEC program execution unit 130, the motion processing unit 132 executes, for example, a motion command or the like to calculate a necessary command value.

[0035] In the control device 100 according to the present embodiment, after the processing of the motion processing unit 132 is executed, the application program execution unit 134 executes processing. Therefore, the feedback value acquired by the motion processing unit 132 and the command value calculated by the motion processing unit 132 can be referred to during the execution of the processing of the application program execution unit 134.

[0036] By referring to the values acquired or calculated by the execution of the motion processing unit 132 in this way, higher-precision control can be realized in the application program 160.

[0037] <B. Hardware Configuration Example> Next, a hardware configuration example of the main devices constituting the control system 1 shown in FIG. 1 will be described.

[0038] (b1: Control Device 100) FIG. 3 is a schematic diagram showing a hardware configuration example of the control device 100 constituting the control system 1 according to the present embodiment. Referring to FIG. 3, the control device 100 includes a processor 102, a main memory 104, a storage 110, a memory card interface 112, a host network controller 106, a field network controller 108, a local bus controller 116, and a USB controller 120 that provides a USB (Universal Serial Bus) interface. These components are connected via a processor bus 118.

[0039] The processor 102 corresponds to an arithmetic processing unit that executes control calculations, and is composed of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), etc. Specifically, the processor 102 reads out a program stored in the storage 110, expands it in the main memory 104, and executes it to realize control calculations for a control target.

[0040] The main memory 104 is configured with a volatile storage device such as a dynamic random access memory (DRAM) or a static random access memory (SRAM). The storage 110 is configured with a non-volatile storage device such as a solid state drive (SSD) or a hard disk drive (HDD).

[0041] The storage 110 stores a system program 111 for implementing basic functions, an IEC program 150 created according to the object to be controlled, and an application program 160.

[0042] The IEC program 150 corresponds to a first user program, and includes instructions for implementing main controls other than the control of the robot 200 in the control system 1. The IEC program 150 may typically include sequence instructions and motion instructions. The IEC program 150 may be written in any language defined in IEC 61131-3 established by the International Electrotechnical Commission (IEC). However, the IEC program 150 may include a program written in a manufacturer-specific language other than the language defined in IEC 61131-3.

[0043] The application program 160 corresponds to a second user program, and includes instructions for controlling the robot 200. The application program 160 may include instructions written in a predetermined programming language (for example, a programming language for robot control such as the V+ language, or a programming language related to NC control such as the G-code).

[0044] The memory card interface 112 accepts a memory card 114, which is an example of a removable storage medium. The memory card interface 112 is capable of reading and writing any data from and to the memory card 114.

[0045] The upper network controller 106 exchanges data with any information processing device (such as the display device 700 and the server device 800 shown in FIG. 1) via the upper network 20.

[0046] The field network controller 108 exchanges data with each device via the field network 10. In the example system configuration shown in FIG.

[0047] The local bus controller 116 exchanges data with any functional unit 124 included in the control device 100 via the local bus 122. The functional unit 124 may be, for example, an analog I / O unit responsible for input and / or output of analog signals, a digital I / O unit responsible for input and / or output of digital signals, or the like.

[0048] The USB controller 120 exchanges data with any information processing device (such as the support device 600) via a USB connection.

[0049] (b2: Robot Controller 250) 4 is a schematic diagram showing an example of a hardware configuration of a robot controller 250 constituting the control system 1 according to the present embodiment. Referring to FIG. 4, the robot controller 250 includes a field network controller 252 and a control processing circuit 260.

[0050] The field network controller 252 mainly exchanges data with the control device 100 via the field network 10. In other words, the field network controller 252 corresponds to an interface for connecting with the control device 100 via the field network 10.

[0051] The control processing circuit 260 executes calculation processing required to drive the robot 200. As an example, the control processing circuit 260 includes a processor 262, a main memory 264, a storage 266, and an interface circuit 270.

[0052] The processor 262 executes control calculations for driving the robot 200. The main memory 264 is composed of, for example, a volatile storage device such as a DRAM or an SRAM. The storage 266 is composed of, for example, a non-volatile storage device such as an SSD or an HDD.

[0053] The storage 266 stores a system program 268 for implementing control for driving the robot 200. The system program 268 includes instructions for executing control calculations related to the operation of the robot 200, and instructions related to the interface with the robot 200.

[0054] The interface circuit 270 exchanges data with the robot 200 . (b3: Servo driver 350) 5 is a schematic diagram showing an example of a hardware configuration of a servo driver 350 constituting the control system 1 according to the present embodiment. Referring to FIG. 5, the servo driver 350 includes a field network controller 352, a control processing circuit 360, a drive circuit 370, and a counter circuit 372.

[0055] The field network controller 352 mainly exchanges data with the control device 100 via the field network 10 .

[0056] The control processing circuit 360 executes arithmetic processing required for controlling the servo motor 300. As an example, the control processing circuit 360 includes a processor 362, a main memory 364, and a storage 366.

[0057] The processor 362 executes control calculations related to the servo motor 300. The main memory 364 is formed of, for example, a volatile storage device such as a DRAM or an SRAM. The storage 366 is formed of, for example, a non-volatile storage device such as an SSD or an HDD.

[0058] The storage 366 stores a system program 368 for implementing drive control of the servo motor 300. The system program 368 includes instructions for executing control calculations related to the operation of the servo motor 300, and instructions related to the interface with the servo motor 300.

[0059] The drive circuit 370 includes a converter circuit, an inverter circuit, and the like, and generates power of a specified voltage, current, and phase according to a command calculated by the control processing circuit 360 , and supplies it to the servo motor 300 .

[0060] The counter circuit 372 includes an A / D circuit, a register, and the like that receives the pulses from the encoder 310 .

[0061] (b4: Image processing device 450) The image processing device 450 constituting the control system 1 according to the present embodiment may be realized, for example, by using a general-purpose personal computer. A basic hardware configuration example of the image processing device 450 is well known, so a detailed description will not be given here.

[0062] (b5: remote IO device 500) The remote IO device 500 constituting the control system 1 according to the present embodiment includes a field network controller and a control processing circuit, as well as a unit for acquiring a signal from a control target and / or outputting a signal to the control target, similar to the servo driver 350 shown in Fig. 5. The remote IO device 500 may be equipped with, for example, an analog I / O unit responsible for inputting and / or outputting analog signals, a digital I / O unit responsible for inputting and / or outputting digital signals, or the like.

[0063] (b6: Support device 600) The support device 600 constituting the control system 1 according to the present embodiment may be realized, for example, by using a general-purpose personal computer.

[0064] Fig. 6 is a schematic diagram showing an example of a hardware configuration of a support device 600 constituting the control system 1 according to the present embodiment. With reference to Fig. 6, the support device 600 includes a processor 602 such as a CPU or an MPU, a main memory 604, an input unit 606, a display unit 608, a storage 610, a network controller 616, a USB controller 618, and an optical drive 620. These components are connected via a bus 624.

[0065] The processor 602 reads various programs stored in the storage 610, expands them in the main memory 604, and executes them to provide processing such as the development of user programs (IEC program 150 and application program 160) to be executed by the control device 100.

[0066] The storage 610 is composed of, for example, a non-volatile storage device such as an SSD or HDD. The storage 610 typically stores an OS 612 and a development program 614 for creating a user program to be executed in the control device 100, debugging the created user program, defining a system configuration, setting various parameters, and the like. The storage 610 may store necessary programs other than the programs shown in FIG.

[0067] The input unit 606 is made up of a keyboard, a mouse, etc., and accepts user operations. The display unit 608 is made up of a display, various indicators, a printer, etc., and outputs the processing results from the processor 602, etc.

[0068] A network controller 616 controls data transfer to and from other devices over any network. A USB controller 618 controls data transfer to and from the control device 100 over a USB connection.

[0069] The support device 600 has an optical drive 620, and a program stored therein is read from a recording medium 622 (e.g., an optical recording medium such as a DVD (Digital Versatile Disc)) that non-transiently stores a computer-readable program, and the program is installed in storage 610, etc.

[0070] Various programs executed by the support device 600 may be installed via a computer-readable recording medium 622, or may be installed by downloading from a server device on a network. In addition, the functions provided by the support device 600 according to this embodiment may be realized by using some of the modules provided by the OS 612.

[0071] (b7:Display device 700) The display device 700 that constitutes the control system 1 according to the present embodiment may be realized using, for example, a general-purpose personal computer. Since a basic hardware configuration example of the display device 700 is well-known, detailed description thereof will not be given here.

[0072] (b8: Server device 800) The server device 800 that constitutes the control system 1 according to the present embodiment may be realized using, for example, a general-purpose personal computer. Since a basic hardware configuration example of the server device 800 is well-known, detailed description thereof will not be given here.

[0073] (b9: Other forms) In FIGS. 3 to 6, configuration examples in which necessary functions are provided by one or more processors executing a program are shown. However, some or all of these provided functions may be implemented using a dedicated hardware circuit (for example, an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array), etc.).

[0074] <Execution of IEC program and application program> Next, the execution of the IEC program 150 and the application program 160 in the control device 100 according to the present embodiment will be described.

[0075] FIG. 7 is a schematic diagram showing a configuration related to a program execution environment in the control device 100 according to the present embodiment. Referring to FIG. 7, the control device 100 includes an IEC program execution unit 130, an application program execution unit 134, and a data management unit 142.

[0076] The IEC program execution unit 130 corresponds to a first program execution unit that periodically executes an IEC program 150 (first user program) including sequence commands. The IEC program execution unit 130 has a motion processing unit 132, and executes motion commands and the like included in the IEC program 150 according to a motion setting 152.

[0077] The application program execution unit 134 corresponds to a second program execution unit that executes an application program 160 (second user program) for controlling the robot 200. The application program execution unit 134 executes the application program 160 in accordance with a reference variable setting 162. The application program execution unit 134 includes an interpreter 136, a cache 138, and a command transmission unit 140.

[0078] The interpreter 136 sequentially interprets the application program 160 to generate intermediate code. The generated intermediate code is queued (enqueued) in a cache 138. The command transmission unit 140 refers to the intermediate code queued in the cache 138 each time and transmits a command to the target robot 200.

[0079] The data management unit 142 holds data necessary for program execution. The data held by the data management unit 142 is refreshed (updated) at a predetermined cycle. The data management unit 142 includes an IO data area 144 for holding input / output data, an internal data area 146 for holding working data used inside the control device 100, and a shared area 148. The shared area 148 stores data that can be commonly referenced by the IEC program execution unit 130 and the application program execution unit 134. The data management unit 142 may manage data in the form of variables.

[0080] Fig. 8 is a schematic diagram showing the execution cycle of a program in the control device 100 according to this embodiment. Referring to Fig. 8, the control device 100 cyclically executes input / output refresh processing 170, motion input processing 171, application input processing 172, IEC program execution processing 173, motion execution processing 174, and application execution processing 175 in this order for each control cycle T1.

[0081] The input / output refresh process 170 includes a process of outputting output data (command values) calculated in the previous control cycle T1, and a process of acquiring input data to be used in the current control cycle.

[0082] The motion input process 171 includes a process for acquiring data necessary for processing in the motion processing unit 132. In this manner, before the IEC program 150 is executed, a process for acquiring a current value from a target device (target axis) is executed.

[0083] The application input process 172 includes a process for acquiring data necessary for processing in the application program execution unit 134 .

[0084] The IEC program execution process 173 corresponds to the execution process of the IEC program 150, and includes a process of calculating output data and new internal data from input data and internal data in accordance with the IEC program 150.

[0085] The motion execution process 174 corresponds to the execution of the process of the motion processing unit 132, and includes, for example, the execution process of a motion command included in the IEC program 150. It also includes the process of outputting the processing result from the motion processing unit 132. Typically, the motion execution process 174 includes the process of calculating a command value for a target device (target axis).

[0086] The application execution process 175 corresponds to the execution process of the application program 160, and includes the instruction execution in the application program execution unit 134 and the process of outputting the processing result from the application program execution unit 134 (the process of sending a command to the robot 200).

[0087] In this way, in the control device 100, the execution of the IEC program 150 (the first user program), the execution of the processing in the motion processing unit 132, and the execution of the application program 160 are repeated every predetermined control cycle T1 in this order.

[0088] Since the control device 100 repeatedly executes the execution of the IEC program 150, the execution of the processing in the motion processing unit 132, and the execution of the application program 160 every control cycle T1, within the same control cycle T1, the processing result by the motion processing unit 132 can be reflected in the application program 160. As a result, the control device 100 can refer to the value calculated by the execution of the processing in the motion processing unit 132 in the execution of the subsequent application program 160 within the same control cycle T1.

[0089] <Reference in the application execution unit to the information managed by the motion processing unit>[ As described above, the control device 100 according to the present embodiment can reflect the processing result of the motion processing unit 132 in the execution in the application program execution unit 134. Hereinafter, as an example, an example of adjusting the moving speed of the robot 200 according to the moving speed of the conveyor 30 (the number of pulses per unit time from the encoder 310) will be described. The moving speed of the conveyor 30 is calculated by the execution of the processing in the motion processing unit 132.

[0090] (d1: Data exchange method) First, a method for exchanging data between the motion processing unit 132 and the application program execution unit 134 will be described. In this method, the application program execution unit 134 refers to data (feedback values ​​and command values) held by the motion processing unit 132.

[0091] Fig. 9 is a schematic diagram showing an example of a method for reflecting the processing result of the motion processing unit 132 in the execution of the application program execution unit 134 in the control device 100 according to this embodiment. Fig. 9 shows the processing and data exchange in a control period T1. The series of processing shown in Fig. 9 is realized in an execution environment of a user program realized by the processor 102 executing the system program 111. In other words, the system program 111 provides a basic environment for realizing the processing in the control device 100 as described below. The same applies to the series of processing shown in Fig. 10.

[0092] 9, the input / output data held in the IO data area 144 of the data management unit 142 is updated by the input / output refresh process 170 (see FIG. 8) (sequence SQ10).

[0093] In the motion input process 171 (see FIG. 8), the motion processing unit 132 acquires input data for calculating a feedback value (sequence SQ12). The input data may include a state value of a device (target axis) that is the target of the motion process. The motion processing unit 132 then calculates a feedback value from the acquired input data and updates it with the calculated feedback value (sequence SQ14). Typically, the feedback value is an actual value of the moving speed of the conveyor 30. Note that the data to be updated includes a value that has been requested to be acquired and stored in advance by the application program execution unit 134 (see sequence SQ16 described later).

[0094] Next, in application input processing 172 (see FIG. 8), the application program execution unit 134 requests the motion processing unit 132 to acquire and hold data so that necessary data for motion processing can be used in the subsequent application execution processing 175 (see FIG. 8) (sequence SQ16). This request will be executed in the next control cycle. The target data is defined in the reference variable setting 162 (see FIG. 7).

[0095] Therefore, the motion input process 171 includes a process for retaining values ​​to be referenced during execution of the application program 160 in accordance with the predetermined reference variable settings 162 (sequences SQ14 and SQ16).

[0096] Next, in the IEC program execution process 173 (see FIG. 8), the IEC program execution unit 130 acquires input data and internal data (sequence SQ18), executes the IEC program 150 (sequence SQ20), and stores the execution results in the data management unit 142 as output data and internal data (sequence SQ22).

[0097] Next, in motion execution processing 174 (see FIG. 8), the motion processing unit 132 acquires input data (sequence SQ24), executes the target motion processing (sequence SQ26), updates the execution result (command value) (sequence SQ28), and stores it as output data in the IO data area 144 of the data management unit 142 (sequence SQ30). Note that the data to be updated includes values ​​that have been requested by the application program execution unit 134 to be acquired and stored in advance (see sequence SQ16).

[0098] Therefore, the motion execution process 174 includes a process of holding values ​​to be referenced in the execution of the application program 160 according to the predetermined reference variable settings 162 (sequences SQ16 and SQ28).

[0099] Next, in application execution processing 175 (see FIG. 8), application program execution unit 134 acquires input data (sequence SQ32) and executes application program 160 (sequence SQ34). When application program execution unit 134 needs to refer to data held by motion processing unit 132 during the execution of application program 160, it attempts to acquire the data from motion processing unit 132 (sequence SQ36) and acquires the data held by motion processing unit 132 (sequence SQ38). In this way, execution of application program 160 includes processing that refers to values ​​held in the execution of a previously executed motion process. In other words, processing that executes application program 160 includes processing that refers to values ​​calculated by the execution of a motion process within the same control period.

[0100] Note that the data that can be referenced by the motion processing unit 132 is required to be acquired and stored in advance in the above-mentioned sequence SQ16. The data stored by the motion processing unit 132 may include feedback values ​​acquired in the current control cycle and command values ​​calculated by the motion processing unit 132 in the current control cycle.

[0101] Then, the application program execution unit 134 stores the execution result of the application program 160 in the IO data area 144 of the data management unit 142 as output data (sequence SQ40). Furthermore, when the execution of the application program 160 requires the transmission of a command, the application program execution unit 134 transmits the command to the target robot 200 (sequence SQ42). The output data can also include an imaging trigger that instructs the image processing device 450 to capture an image with the camera 400. Furthermore, the command generated by the execution of the application program 160 can also reflect the feedback value and command value held by the motion processing unit 132.

[0102] Through the above-described processing procedure, the application program execution unit 134 can perform necessary processing and generate commands by using data acquired and generated by the motion processing unit 132 in the same control period. That is, within the same control period T1, values ​​calculated by the execution of processing by the motion processing unit 132 can be referenced in the subsequent execution of the application program 160.

[0103] (d2: Shared data reference method) Next, a method for referencing shared data between the motion processing unit 132 and the application program execution unit 134 will be described. In this method, the motion processing unit 132 and the application program execution unit 134 each refer to the data stored in the shared area 148.

[0104] FIG. 10 is a schematic diagram showing another example of a method for reflecting the processing result of the motion processing unit 132 in the execution of the application program execution unit 134 in the control device 100 according to the present embodiment.

[0105] 10, the input / output data held in the IO data area 144 of the data management unit 142 is updated by the input / output refresh process 170 (see FIG. 8) (sequence SQ10).

[0106] In the motion input process 171 (see FIG. 8), the motion processing unit 132 acquires input data for calculating a feedback value (sequence SQ12), calculates a feedback value from the acquired input data, and updates it with the calculated feedback value (sequence SQ14). Then, the motion processing unit 132 stores the calculated feedback value in the shared area 148 of the data management unit 142 (sequence SQ48).

[0107] In this way, the execution of processing by the motion processing unit 132 includes a process of storing values ​​to be referenced in the execution of the application program 160 in the shared area 148 according to the predetermined reference variable settings 162. The values ​​stored in the shared area 148 can be referenced in the execution of the application program 160.

[0108] In the processing procedure shown in FIG. 10, no substantial processing is performed in the application input process 172 (see FIG. 8).

[0109] Next, in the IEC program execution process 173 (see FIG. 8), the IEC program execution unit 130 acquires input data and internal data (sequence SQ18), executes the IEC program 150 (sequence SQ20), and stores the execution results in the data management unit 142 as output data and internal data (sequence SQ22).

[0110] Next, in motion execution processing 174 (see Figure 8), the motion processing unit 132 acquires input data (sequence SQ24), executes the target motion processing (sequence SQ26), stores the execution result (command value) (sequence SQ28), and also stores it as output data in the IO data area 144 and shared area 148 of the data management unit 142 (sequence SQ50).

[0111] In this way, the execution of processing by the motion processing unit 132 includes a process of storing values ​​to be referenced in the execution of the application program 160 in the shared area 148 according to the predetermined reference variable settings 162. The values ​​stored in the shared area 148 can be referenced in the execution of the application program 160.

[0112] Subsequently, in the application execution process 175 (see FIG. 8), the application program execution unit 134 acquires input data (sequence SQ32) and executes the application program 160 (sequence SQ34). During the execution of the application program 160, when the application program execution unit 134 needs to refer to the data held by the motion processing unit 132, it acquires the data stored in the shared area 148 of the data management unit 142 (sequence SQ52). In this way, the execution of the application program 160 includes a process of referring to the values stored in the shared area 148 during the execution of the previously executed motion processing unit 132. That is, the process of executing the application program 160 includes a process of referring to the values calculated by the execution of the motion processing within the same control cycle.

[0113] Then, the application program execution unit 134 stores the execution result of the application program 160 as output data in the IO data area 144 of the data management unit 142 (sequence SQ40). Also, when the execution of the application program 160 requires the transmission of a command, the application program execution unit 134 transmits the command to the target robot 200 (sequence SQ42).

[0114] Through the processing procedure as described above, the application program execution unit 134 can utilize the data acquired and generated by the motion processing unit 132 in the same control cycle to perform necessary processing and generate commands. That is, within the same control cycle T1, the values calculated by the execution of the motion processing unit 132 can be referred to during the subsequent execution of the application program 160.

[0115] <E. Setting Examples and Application Program Examples> Next, a setting example for the control device 100 of the control system 1 according to the present embodiment and an example of the application program 160 executed by the control device 100 will be described.

[0116] Fig. 11 is a schematic diagram showing an example of a user interface screen provided by the support device 600 according to the present embodiment. Fig. 11 shows a user interface screen 650 for generating the motion settings 152 (see Fig. 7) related to the motion processing.

[0117] The user interface screen 650 accepts the selection of a target axis (in this embodiment, the servo motor 300 driven by the servo driver 350) and accepts the setting of parameters related to the target axis. An example of setting an axis labeled "MC_Axis000(0)" is shown in FIG.

[0118] More specifically, the user interface screen 650 includes a setting reception unit 652 that receives setting values ​​related to the speed, acceleration, and torque associated with driving the target axis (servo motor 300), and a setting reception unit 654 that receives setting values ​​related to the servo motor 300 connected to the servo driver 350. The setting values ​​(parameters) set via the user interface screen 650 are stored as motion settings 152.

[0119] Fig. 12 is a schematic diagram showing another example of a user interface screen provided by the support device 600 according to the present embodiment. Fig. 12 shows a user interface screen 660 for generating reference variable setting 162 (see Fig. 7) that defines variables that can be referenced when the application program 160 is executed.

[0120] The user interface screen 660 accepts the selection of a target axis (in this embodiment, the servo motor 300 driven by the servo driver 350) and accepts the setting of parameters related to the target axis.

[0121] More specifically, the user interface screen 660 displays "Using_EndoderID" as a target identification display field 663 for identifying a target axis or variable on the application program 160 side. The user sets information for identifying a target axis in association with a desired "Using_EndoderID" (axis setting field 664). In the example shown in FIG. 12, "MC_Axis000(0)" is associated with a first entry 661 with "Using_EndoderID" of "101", and "MC_Axis000(0)" is associated with a second entry 662 with "Using_EndoderID" of "102".

[0122] The user interface screen 660 allows the user to set which of a plurality of values ​​associated with the target axis is to be used. That is, the user interface screen 660 has a data type selection field 665. When selecting the current value of the target axis, i.e., the feedback value, "Actual Position" is selected. When selecting a command value for the target axis, "Command Position" is selected. In the example shown in FIG. 12, the current value (feedback value) of "MC_Axis000(0)" is assigned to the first entry 661, and the command value of "MC_Axis000(0)" is assigned to the second entry 662.

[0123] In this way, the reference variable settings 162 include information that associates variables defined for the motion processing with variables defined in the application program 160.

[0124] Furthermore, the user interface screen 660 has an update condition setting field 666 for setting conditions for updating the values ​​of each entry.

[0125] The number of the latch signal, which is set by a procedure described below, can be set in the update condition setting field 666. If no number is set in the update condition setting field 666, the value will be updated every control cycle.

[0126] On the other hand, if no number is set in the update condition setting field 666, the corresponding value will be updated when the signal with the set number changes (from FALSE to TRUE, or from TRUE to FALSE). If the number set in the update condition setting field 666 is positive, the rising edge of the signal (from FALSE to TRUE) becomes the condition for updating the value, and if the number set in the update condition setting field 666 is negative, the rising edge of the signal (from TRUE to FALSE) becomes the condition for updating the value.

[0127] Fig. 13 is a schematic diagram showing yet another example of a user interface screen provided by the support device 600 according to the present embodiment. Fig. 13 shows a user interface screen 670 for defining a number that can be set in the update condition setting field 666 of the user interface screen 660 shown in Fig. 12.

[0128] The user interface screen 670 includes a source device setting field 673 for setting the device that will acquire the input / output signal that will become the latch signal, a port setting field 674 for setting the position of the target data among the data held by the set device, and a number setting field 675 for setting the assigned number.

[0129] 13, the number "4001" is associated with the first entry 671, and the number "4002" is associated with the second entry 672. The latch number set on the user interface screen 670 can also be referenced by the application program 160.

[0130] The contents set on the user interface screens shown in FIG. 12 and FIG.

[0131] FIG. 14 is a schematic diagram showing an example of an application program 160 executed by the control device 100 according to the present embodiment. FIG. 14 shows, as an example, a program example in which, when an image capture trigger is given from the control device 100 to the camera 400, the robot 200 moves to follow the conveyor 30. FIG. 14 shows, as an example, the code of a robot program written in the V+ language. In the V+ language, each command is called a "keyword." In the following, a case where a "keyword" is used as an example of a "command," however, it is not limited to a "keyword," and any command according to the language system can be used.

[0132] 14, application program 160 includes, as an initial setting, code 1601 for setting a target axis for identifying a target axis. In the example shown in Fig. 14, an axis with "Using_EndoderID" of "101" is set in the "num" property of object "belt". Application program 160 includes, as an initial setting, code 1602 for initializing a latch signal held by the target axis.

[0133] The code 1603 of the application program 160 is a command for moving the robot 200 to its initial position. The code 1604 of the application program 160 is a command for making various settings.

[0134] The code 1605 of the application program 160 defines instructions to be executed when a predetermined condition is satisfied. The instructions to be executed include code 1606 for waiting until a signal with a latch number of "4001" is detected (rises or a rising edge occurs), code 1607 for obtaining the current value of the target axis when the signal is detected, and code 1608 for causing the robot 200 to perform a predetermined operation based on the current value of the target axis. That is, in code 1607, the current value of the target axis is set to the variable 1609 with "%belt", and in code 1608, commands such as movement based on the variable 1609 (variable %belt) are transmitted to the robot 200.

[0135] As described above, in the control device 100 according to the present embodiment, when the IEC program 150 is executed, the motion processing unit 132 can refer to information regarding the motion axes it manages without delay, so the control performance can be further enhanced.

[0136] <F. Current value correction> As shown in FIG. 12, when the condition of the latch signal is satisfied, the current value is obtained from the target axis. At this time, if there is a time deviation between the timing when the condition of the latch signal is satisfied and the timing when the current value is obtained from the target axis, a process for correcting the time deviation may be performed.

[0137] Specifically, using the timing (time t1) when the condition of the latch signal is satisfied and the timing (time t2) when the current value is obtained from the target axis, the feedback position at time t1 can be calculated as (the current value obtained at time t2) + the moving speed of the target axis (feedback speed) × (t1 - t2).

[0138] Such current value correction processing may be executed by the system program 111 of the control device 100.

[0139] <G. Supplementary note> The present embodiment as described above includes the following technical ideas.

[0140] [Configuration 1] A control device (100) for controlling a control target, a first program execution unit (130) that executes a first user program (150) including a sequence command; A motion processing unit (132); a second program execution unit (134) that executes a second user program (160) for controlling the robot (200); The execution (173) of the first user program, the execution (174) of the process of the motion processing unit, and the execution (175) of the second user program are repeated in this order for every predetermined control period (T1); A control device configured so that, within the same control period, a value calculated by execution of processing by the motion processing unit can be referenced in subsequent execution of the second user program.

[0141] [Configuration 2] The control device according to configuration 1, wherein the execution of the processing by the motion processing unit includes a process (SQ14, SQ28) of retaining values ​​to be referenced in the execution of the second user program in accordance with a predetermined setting (162).

[0142] [Configuration 3] The control device according to configuration 2, wherein execution of the second user program includes processing (SQ36, SQ38) for referencing values ​​held in execution of a previously executed processing of the motion processing section.

[0143] [Configuration 4] The control device according to configuration 1, wherein the execution of the processing by the motion processing unit includes a process (SQ48) of storing a value to be referenced in the execution of the second user program in a shared area in accordance with a predetermined setting (162).

[0144] [Configuration 5] The control device according to configuration 4, wherein execution of the second user program includes a process (SQ52) of referencing a value stored in the shared area during execution of a previously executed process of the motion processing section.

[0145] [Configuration 6] The control device according to any one of configurations 2 to 5, wherein the predetermined settings include information (162; 660) that associates variables defined with respect to the processing of the motion processing unit with variables defined in the second user program.

[0146] [Configuration 7] 7. The control device according to any one of configurations 1 to 6, wherein the execution of the process by the motion processing unit includes a process of calculating a command value for a target device.

[0147] [Configuration 8] 8. The control device according to any one of configurations 1 to 7, wherein a process (171) of acquiring a current value from a target device is executed before the first user program is executed.

[0148] [Configuration 9] A program execution method in a control device (100) for controlling a control target, comprising: At every predetermined control period (T1), Executing (173) a first user program (150) including sequence instructions; executing (174) a motion process following execution of the first user program; and repeating (175) a step of executing a second user program (160) following execution of the motion processing; A program execution method, wherein the step of executing the second user program includes a step of referring to values ​​calculated by execution of the motion processing within the same control period.

[0149] [Configuration 10] A program (111) directed to a control device (100) for controlling a controlled object, the program causing the control device to execute, for each predetermined control period (T1), a step (173) of executing a first user program including sequence instructions, a step (174) of executing motion processing following the execution of the first user program, and a step (175) of repeating a step of executing a second user program following the execution of the motion processing, wherein the step of executing the second user program includes a step of referring to a value calculated by the execution of the motion processing within the same control period.

[0150] <H. Advantages> According to the control device 100 according to the present embodiment, a value calculated by the execution of motion processing can be referred to in the execution of a subsequent application program 160 within the same control period T1. Therefore, when controlling the robot 200 by referring to values (command values and feedback values (current values)) related to specific axes (devices) related to motion processing, it is possible to reduce the time lag and fluctuations in data update. As a result, it is possible to realize more accurate control in cooperation with motion processing and robot control.

[0151] It should be considered that all the embodiments disclosed this time are illustrative in all respects and not restrictive. The scope of the present invention is shown not by the above description but by the claims, and it is intended that all modifications within the meaning and scope equivalent to the claims are included.

Explanation of Reference Numerals

[0152] 1 control system, 2 work, 10 field network, 20 upper network, 30 conveyor, 50, 60, 70 execution period, 100 control device, 102, 262, 362, 602 processor, 104, 264, 364, 604 main memory, 106 upper network controller, 108, 252, 352 field network controller, 110, 266, 366, 610 storage, 111, 268, 368 system program, 112 memory card interface, 114 memory card, 116 local bus controller, 118 processor bus, 120, 618 USB controller, 122 local bus, 124 functional unit, 130 IEC program execution unit, 132 motion processing unit, 134 application program execution unit, 136 interpreter, 138 cache, 140 command transmission unit, 142 data management unit, 144 IO data area, 146 internal data area, 148 shared area, 150 IEC program, 152 motion setting, 160 application program, 162 reference variable setting, 170 I / O refresh processing, 171 motion input processing, 172 application input processing, 173 IEC program execution processing, 174 motion execution processing, 175 application execution processing, 200 robot, 250 robot controller, 260, 360 control processing circuit, 270 interface circuit, 300 servo motor, 310 encoder, 350 servo driver, 370 drive circuit, 372 counter circuit, 400 camera, 450 image processing device, 500 remote IO device, 600 support device, 606 input section, 608 display section, 612 OS, 614 development program, 616 network controller, 620 optical drive, 622 recording medium, 624 bus, 650, 660, 670 user interface screen, 652, 654 setting reception section, 661, 671 first entry, 662, 672 second entry, 663 target specific display field, 664 axis setting field, 665 data type selection field, 666 update condition setting field, 673 source device setting field, 674 port setting field, 675 number setting field, 700 display device, 800 server device, 1601, 1602,1603,1604,1605,1606,1607,1608 Code, 1609 Variable, T1 Control Period.

Claims

1. A control device for controlling a control target, a first program execution unit that executes a first user program including a sequence command; A motion processing unit; a second program execution unit that executes a second user program for controlling the robot; the execution of the first user program, the execution of the process of the motion processing unit, and the execution of the second user program are repeated in this order for each predetermined control period; A control device configured so that, within the same control period, values ​​calculated by execution of processing by the motion processing unit can be referenced in subsequent execution of the second user program.

2. The control device according to claim 1 , wherein the execution of the process by the motion processing section includes a process of retaining a value to be referenced in the execution of the second user program in accordance with a predetermined setting.

3. The control device according to claim 2 , wherein the execution of the second user program includes a process of referencing a value held in a previously executed process of the motion processing section.

4. The control device according to claim 1 , wherein the execution of the process by the motion processing section includes a process of storing, in a shared area, a value to be referenced in the execution of the second user program, in accordance with a predetermined setting.

5. The control device according to claim 4 , wherein the execution of the second user program includes a process of referencing a value stored in the shared area in a previously executed process of the motion processing section.

6. A control device as claimed in any one of claims 2 to 5, wherein the predetermined settings include information correlating variables defined with respect to the processing of the motion processing unit with variables defined in the second user program.

7. The control device according to any one of claims 1 to 6, wherein the processing by the motion processing unit includes a process of calculating a command value for a target device.

8. The control device according to claim 1 , further comprising: a process for acquiring a current value from a target device before the first user program is executed.

9. A program execution method in a control device for controlling a control target, comprising: At each predetermined control period, executing a first user program including sequence instructions; executing a motion process following execution of the first user program; and repeating a step of executing a second user program following the execution of the motion processing; A program execution method, wherein the step of executing the second user program includes a step of referring to a value calculated by execution of the motion processing within the same control period.

10. A program for a control device for controlling a control target, the program comprising: At each predetermined control period, executing a first user program including sequence instructions; executing a motion process following execution of the first user program; executing the motion processing and then executing a second user program; A program, wherein the step of executing the second user program includes a step of referring to a value calculated by execution of the motion processing within the same control period.

Citation Information

Patent Citations

  • Control device

    JP2019036043A

  • Controller and control method

    JP2019049947A

  • Control apparatus and control method

    JP2019053459A

  • Control device

    JP2021002113A