WO2022162958A1 - Control device, program execution method, and program - Google Patents

Control device, program execution method, and program Download PDF

Info

Publication number
WO2022162958A1
WO2022162958A1 PCT/JP2021/009576 JP2021009576W WO2022162958A1 WO 2022162958 A1 WO2022162958 A1 WO 2022162958A1 JP 2021009576 W JP2021009576 W JP 2021009576W WO 2022162958 A1 WO2022162958 A1 WO 2022162958A1
Authority
WO
WIPO (PCT)
Prior art keywords
execution
program
processing
user program
control device
Prior art date
Application number
PCT/JP2021/009576
Other languages
French (fr)
Japanese (ja)
Inventor
征彦 仲野
哲司 若年
誠啓 里村
秀平 宮口
知行 島村
沙矢香 里中
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2022162958A1 publication Critical patent/WO2022162958A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J13/00Controls for manipulators
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form

Definitions

  • the present invention relates to a control device, program execution method and program.
  • Patent Document 1 discloses a configuration in which a single control device realizes control calculations according to a plurality of types of programs with different execution formats.
  • the robot For example, assuming an application in which a robot picks up a work flowing on a belt conveyor and places it in a predetermined position, the robot must move according to the speed of the belt conveyor.
  • One of the purposes of the present invention is to provide a technology that enables more precise control in which motion processing and robot control are linked.
  • a control device for controlling a controlled object includes a first program execution unit executing a first user program including sequence instructions, a motion processing unit, and a second program execution unit executing a second user program for controlling the robot.
  • the order of execution of the first user program, execution of the processing of the motion processing unit, and execution of the second user program is configured to be repeated every predetermined control cycle. In the same control cycle, the value calculated by executing the processing of the motion processing section can be referred to in subsequent execution of the second user program.
  • the value calculated by executing the processing of the motion processing unit can be referred to in subsequent execution of the application program within the same control cycle.
  • Execution of processing by the motion processing unit may include processing for holding a value to be referenced in execution of the second user program according to a predetermined setting. According to this configuration, it is possible to directly pass the value referred to during execution to the second user program.
  • Execution of the second user program may include processing that refers to the value held in the previously executed processing of the motion processing unit. According to this configuration, necessary values can be referred to during execution of the second user program.
  • Execution of processing by the motion processing unit may include processing for storing, in a shared area, a value to be referenced in execution of the second user program according to a predetermined setting. According to this configuration, it is possible to pass a value referred to during execution to the second user program via the shared area.
  • Execution of the second user program may include a process of referring to the value stored in the shared area in the previously executed process of the motion processing unit. According to this configuration, necessary values can be referred to from the shared area during execution of the second user program.
  • 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. According to this configuration, among the values referred to in the processing of the motion processing section, the values necessary for the second user program can be set in advance.
  • the processing of the motion processing unit may include processing of calculating command values for the target device.
  • the second user program can refer to the command value calculated by executing the processing of the motion processing section.
  • the process of acquiring the current value from the target device may be executed. According to this configuration, necessary information can be acquired in the current control cycle before execution of the process.
  • a program execution method in a control device for controlling a controlled object includes steps of executing a first user program including sequence instructions, executing motion processing following execution of the first user program, and executing motion processing, at each predetermined control cycle. followed by repeating the step of executing the second user program.
  • the step of executing the second user program includes the step of referring to the values calculated by executing the motion processing within the same control cycle.
  • a program directed to a control device for controlling a controlled object causes the control device to execute a first user program including a sequence command at each predetermined control cycle; execute motion processing following execution of the first user program; is followed by the step of executing the second user program and repeating the step of executing the second user program.
  • the step of executing the second user program includes the step of referring to the values calculated by executing the motion processing within the same control cycle.
  • FIG. 1 is a schematic diagram showing a system configuration example of a control system according to an embodiment
  • FIG. 2 is a schematic diagram showing a hardware configuration example of a control device that configures the control system according to the present embodiment
  • FIG. 3 is a schematic diagram showing a hardware configuration example of a robot controller that configures the control system according to the present embodiment
  • FIG. 2 is a schematic diagram showing a hardware configuration example of a servo driver that configures the control system according to the embodiment
  • FIG. 2 is a schematic diagram showing a hardware configuration example of a support device that configures the control system according to the present embodiment
  • FIG. 3 is a schematic diagram showing the configuration of a program execution environment in the control device according to the embodiment;
  • FIG. 4 is a schematic diagram showing a program execution cycle in the control device according to the present embodiment;
  • FIG. 4 is a schematic diagram showing an example of a method of reflecting a processing result of a motion processing section in execution of an application program execution section in the control device according to the present embodiment;
  • FIG. 9 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;
  • FIG. 4 is a schematic diagram showing an example of a user interface screen provided by the support device according to the embodiment;
  • FIG. 5 is a schematic diagram showing another example of a user interface screen provided by the support device according to the embodiment
  • FIG. 9 is a schematic diagram showing still another example of a user interface screen provided by the support device according to the embodiment
  • FIG. 3 is a schematic diagram showing an example of an application program 160 executed by a control device according to the embodiment
  • FIG. 1 is a schematic diagram showing a system configuration example of a control system 1 according to this embodiment.
  • FIG. 1 shows a configuration example in which a robot 200 picks up a workpiece 2 flowing on a conveyor 30 and places it at a predetermined position. The robot 200 picks up the work 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 .
  • control system 1 includes a control device 100 for controlling controlled objects, 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.
  • the control device 100 periodically exchanges data with devices connected to the field network 10 and executes processing as described later.
  • the control device 100 may typically be realized by a PLC (Programmable Logic Controller).
  • the robot controller 250 is in charge of controlling the robot 200. More specifically, robot controller 250 functions as an interface with robot 200 , outputs command values for driving robot 200 in accordance with commands from control device 100 , and provides state information of robot 200 . It acquires and outputs to the control device 100 .
  • any robot such as a vertical articulated robot, a horizontal articulated (scalar) robot, a parallel link robot, or an orthogonal robot can be adopted.
  • the servo driver 350 is in charge of controlling the servo motor 300 that drives the conveyor 30 and receives encoder pulses from the encoder 310 mechanically connected to the conveyor 30 . More specifically, servo driver 350 drives servo motor 300 according to a command from control device 100 , counts encoder pulses from encoder 310 , and outputs them to control device 100 . Servo driver 350 counts the number of pulses received from 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).
  • EtherCAT registered trademark
  • EtherNet/IP protocols for industrial networks such as EtherCAT (registered trademark) and EtherNet/IP can be used.
  • EtherCAT registered trademark
  • EtherNet/IP EtherNet/IP
  • 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 control device 100 via host network 20 so as to be able to exchange data.
  • a protocol for industrial networks such as EtherNet/IP can be used.
  • 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 or the like.
  • the camera 400 takes an image when receiving an imaging trigger from the remote IO device 500 .
  • the control device 100 may be connected to a support device 600 for installing user programs (the IEC program 150 and the application program 160, which will be described later) executed by the control device 100 and performing various settings.
  • user programs the IEC program 150 and the application program 160, which will be described later
  • FIG. 2 is a diagram showing an application example of the control device 100 according to the present embodiment.
  • IEC program execution unit 130 in control device 100, IEC program execution unit 130, motion processing unit 132, and application program execution unit 134 execute processing in this order.
  • the motion processing unit 132 and the application program execution unit 134 include processing of acquiring input data to be used in the current control cycle T1.
  • the motion processing unit 132 acquires a feedback value (current value) as input processing (IN).
  • the application program execution unit 134 also acquires necessary input data as input processing (IN).
  • the motion processing unit 132 executes motion commands and the like to calculate necessary command values.
  • control device 100 since application program execution unit 134 executes processing after execution of processing by motion processing unit 132, the feedback value acquired by motion processing unit 132 and the motion processing unit 132 can be referred to when the application program execution unit 134 executes the processing.
  • the application program 160 can achieve more accurate control.
  • FIG. 3 is a schematic diagram showing a hardware configuration example of the control device 100 that configures the control system 1 according to the present embodiment.
  • control device 100 includes processor 102, main memory 104, storage 110, memory card interface 112, host network controller 106, field network controller 108, local bus controller 116, USB and a USB controller 120 that provides a (Universal Serial Bus) interface. These components are connected via processor bus 118 .
  • the processor 102 corresponds to an arithmetic processing unit that executes control arithmetic, and is composed of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), and the like. Specifically, the processor 102 reads a program stored in the storage 110, develops it in the main memory 104, and executes it, thereby implementing control calculations for the controlled object.
  • a CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the main memory 104 is composed of volatile storage devices such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory).
  • the storage 110 is configured by, for example, a non-volatile storage device such as SSD (Solid State Drive) or HDD (Hard Disk Drive).
  • the storage 110 stores a system program 111 for realizing basic functions, an IEC program 150 and an application program 160 created according to the object to be controlled.
  • the IEC program 150 corresponds to a first user program, and includes instructions for realizing main control other than control of the robot 200 in the control system 1 .
  • An IEC program 150 may typically include sequence instructions and motion instructions.
  • the IEC program 150 may be written in any language defined by IEC61131-3 defined by the International Electrotechnical Commission (IEC). However, the IEC program 150 may include a program written in a manufacturer's own language other than the language defined by IEC61131-3.
  • 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, programming language for robot control such as V+ language or programming language for NC control such as G code).
  • 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/writing arbitrary data from/to the memory card 114 .
  • the host network controller 106 exchanges data with arbitrary information processing devices (such as the display device 700 and the server device 800 shown in FIG. 1) via the host network 20 .
  • the field network controller 108 exchanges data with each device via the field network 10.
  • the field network controller 108 may function as a communication master of the field network 10 .
  • 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 units 124 may include, for example, analog I/O units for inputting and/or outputting analog signals, digital I/O units for inputting and/or outputting digital signals, and the like.
  • the USB controller 120 exchanges data with any information processing device (such as the support device 600) via a USB connection.
  • FIG. 4 is a schematic diagram showing a hardware configuration example of the robot controller 250 that configures the control system 1 according to this embodiment.
  • robot controller 250 includes field network controller 252 and control processing circuit 260 .
  • the field network controller 252 mainly exchanges data with the control device 100 via the field network 10 . That is, field network controller 252 corresponds to an interface for connecting control device 100 via field network 10 .
  • control processing circuit 260 executes arithmetic processing required to drive the robot 200 .
  • control processing circuitry 260 includes processor 262 , main memory 264 , storage 266 and interface circuitry 270 .
  • a processor 262 executes control operations for driving the robot 200 .
  • the main memory 264 is composed of, for example, a volatile memory device such as DRAM or SRAM.
  • the storage 266 is configured by, for example, a non-volatile storage device such as SSD or HDD.
  • a system program 268 for realizing control for driving the robot 200 is stored in the storage 266 .
  • the system program 268 includes instructions for executing control operations related to the operation of the robot 200 and instructions related to interfacing with the robot 200 .
  • FIG. 5 is a schematic diagram showing a hardware configuration example of the servo driver 350 that configures the control system 1 according to this embodiment.
  • servo driver 350 includes field network controller 352 , control processing circuit 360 , drive circuit 370 and counter circuit 372 .
  • the field network controller 352 mainly exchanges data with the control device 100 via the field network 10 .
  • control processing circuit 360 executes arithmetic processing necessary for controlling the servo motor 300 .
  • control processing circuitry 360 includes processor 362 , main memory 364 , and storage 366 .
  • the processor 362 executes control calculations related to the servomotor 300 .
  • the main memory 364 is composed of, for example, a volatile memory device such as DRAM or SRAM.
  • the storage 366 is configured by, for example, a non-volatile storage device such as SSD or HDD.
  • the storage 366 stores a system program 368 for realizing drive control of the servo motor 300 .
  • the system program 368 includes instructions for executing control calculations related to the operation of the servomotor 300 and instructions related to interfacing with the servomotor 300 .
  • the drive circuit 370 includes a converter circuit, an inverter circuit, and the like, and according to commands calculated by the control processing circuit 360, generates power of specified voltage, current, and phase, and supplies it to the servo motor 300.
  • the counter circuit 372 includes an A/D circuit that receives pulses from the encoder 310, a register, and the like.
  • the image processing device 450 that configures the control system 1 according to the present embodiment may be realized using a general-purpose personal computer as an example.
  • a basic hardware configuration example of the image processing device 450 is well known, and therefore detailed description thereof is omitted here.
  • Remote IO device 500 constituting control system 1 includes a field network controller and a control processing circuit, similarly to servo driver 350 shown in FIG. /or includes a unit that outputs a signal to a controlled object.
  • the remote IO device 500 may be equipped with, for example, an analog I/O unit for inputting and/or outputting analog signals, a digital I/O unit for inputting and/or outputting digital signals, and the like.
  • the support device 600 that configures the control system 1 according to the present embodiment may be realized using a general-purpose personal computer as an example.
  • FIG. 6 is a schematic diagram showing a hardware configuration example of the support device 600 that configures the control system 1 according to the present embodiment.
  • support device 600 includes processor 602 such as a CPU or MPU, main memory 604, input unit 606, display unit 608, storage 610, network controller 616, USB controller 618, and an optical drive 620 . These components are connected via bus 624 .
  • the processor 602 reads out various programs stored in the storage 610 , develops them in the main memory 604 and executes them, thereby developing user programs (IEC programs 150 and application programs 160 ) executed by the control device 100 . Provide processing.
  • the storage 610 is composed of, for example, non-volatile storage devices such as SSDs and HDDs.
  • the storage 610 typically includes an OS 612, a development program 614 for creating a user program to be executed in the control device 100, debugging the created user program, defining the system configuration, setting various parameters, and the like. is stored.
  • the storage 610 may store necessary programs other than the programs shown in FIG.
  • the input unit 606 is composed of a keyboard, mouse, etc., and receives user operations.
  • a display unit 608 includes a display, various indicators, a printer, and the like, and outputs processing results from the processor 602 and the like.
  • a network controller 616 controls the exchange of data with other devices via any network.
  • a USB controller 618 controls data exchange with the control device 100 via a USB connection.
  • the support device 600 has an optical drive 620, and from a recording medium 622 (for example, an optical recording medium such as a DVD (Digital Versatile Disc)) that stores a computer-readable program non-transitory.
  • a recording medium 622 for example, an optical recording medium such as a DVD (Digital Versatile Disc)
  • the stored program is read and installed in the storage 610 or the like.
  • 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 the network. Also, 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 .
  • Display device 700 configuring control system 1 according to the present embodiment may be realized using a general-purpose personal computer as an example. Since the basic hardware configuration example of the display device 700 is well known, detailed description thereof will not be given here.
  • Server device 800 that configures control system 1 according to the present embodiment may be implemented using a general-purpose personal computer as an example. Since the basic hardware configuration example of the server device 800 is well known, detailed description thereof will not be given here.
  • FIG. 3 to 6 show configuration examples in which one or more processors execute programs to provide necessary functions. It may be implemented using a hardware circuit (for example, ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array)).
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • FIG. 7 is a schematic diagram showing the configuration of the program execution environment in control device 100 according to the present embodiment.
  • control device 100 includes an IEC program executing portion 130 , an application program executing portion 134 and a data managing portion 142 .
  • 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 instructions.
  • 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 motion settings 152 .
  • 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 .
  • Application program execution unit 134 executes application program 160 according to reference variable setting 162 .
  • Application program execution unit 134 includes interpreter 136 , cache 138 , and command transmission unit 140 .
  • the interpreter 136 sequentially interprets the application program 160 to generate intermediate code.
  • the generated intermediate code is queued (enqueued) in the 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 .
  • the data management unit 142 holds data necessary for program execution.
  • the data held by the data management unit 142 is refreshed (updated) at predetermined intervals.
  • the data management unit 142 includes an IO data area 144 for holding input/output data, an internal data area 146 and a shared area 148 for holding working data used inside the control device 100 .
  • Shared area 148 stores data that can be commonly referred to by IEC program execution unit 130 and application program execution unit 134 .
  • the data management unit 142 may manage data in the form of variables.
  • FIG. 8 is a schematic diagram showing a program execution cycle in the control device 100 according to the present embodiment.
  • control device 100 performs 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 the order of control period T1. Cyclic execution every time.
  • the input/output refresh process 170 includes a process of outputting the output data (command value) calculated in the previous control cycle T1 and a process of acquiring the input data used in the current control cycle.
  • the motion input processing 171 includes processing for acquiring data necessary for processing in the motion processing unit 132. In this way, before the IEC program 150 is executed, the process of acquiring the current value from the target device (target axis) is executed.
  • the application input processing 172 includes processing for acquiring data necessary for processing in the application program execution unit 134.
  • the IEC program execution processing 173 corresponds to the execution processing of the IEC program 150, and includes processing of calculating output data and new internal data from input data and internal data according to the IEC program 150.
  • the motion execution processing 174 corresponds to execution of processing by the motion processing unit 132, and includes, for example, execution processing of motion commands included in the IEC program 150. It includes processing for outputting the processing result from the motion processing unit 132 .
  • motion execution processing 174 includes processing to calculate command values for target devices (target axes).
  • the application execution processing 175 corresponds to the execution processing of the application program 160, and performs command execution by the application program execution unit 134 and processing for outputting the processing result from the application program execution unit 134 (processing for transmitting a command to the robot 200). include.
  • the execution of the IEC program 150 (first user program), the execution of the processing of the motion processing unit 132, and the execution of the application program 160 are repeated every predetermined control period T1 in this order.
  • control device 100 Since the control device 100 repeatedly executes the execution of the IEC program 150, the execution of the processing of the motion processing unit 132, and the execution of the application program 160 every control cycle T1, the processing result of the motion processing unit 132 is obtained within the same control cycle T1. can be reflected in the application program 160 . As a result, the control device 100 can refer to the values calculated by executing the processing of the motion processing section 132 within the same control period T1 in subsequent execution of the application program 160 .
  • control device 100 can reflect the processing result of motion processing unit 132 in execution by application program execution unit 134 .
  • 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 below. Note that the moving speed of the conveyor 30 is calculated by executing the processing of the motion processing unit 132 .
  • 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 processing and data exchange in the control cycle T1.
  • a series of processes shown in FIG. 9 are realized under the execution environment of the user program realized by the processor 102 executing the system program 111 .
  • the system program 111 provides a basic environment for realizing processing in the control device 100, which will be described later. The same applies to the series of processes shown in FIG.
  • 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).
  • the motion processing unit 132 acquires input data for calculating feedback values (sequence SQ12).
  • the input data may include state values of a device (target axis) targeted for motion processing.
  • 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).
  • the feedback value is the actual value of the moving speed of conveyor 30 .
  • the data to be updated includes values that have been requested to be acquired and held in advance by application program execution unit 134 (see sequence SQ16 described later).
  • the application program execution unit 134 causes the motion processing unit 134 to use necessary data related to motion processing in subsequent application execution processing 175 (see FIG. 8). is requested to acquire and hold data (sequence SQ16). This request will be executed in the next control cycle.
  • the data of interest is defined in reference variable settings 162 (see FIG. 7).
  • the motion input processing 171 includes processing for holding values to be referenced during execution of the application program 160 according to the predetermined reference variable setting 162 (sequences SQ14 and SQ16).
  • IEC program execution unit 130 acquires input data and internal data (sequence SQ18), executes IEC program 150 (sequence SQ20), and outputs the execution result. , are stored in the data management unit 142 as output data and internal data (sequence SQ22).
  • the motion processing unit 132 acquires input data (sequence SQ24), executes target motion processing (sequence SQ26), and executes the execution result (command value). It is updated (sequence SQ28) and stored 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 to be acquired and held in advance by application program execution unit 134 (see sequence SQ16).
  • the motion execution processing 174 includes processing for holding values to be referenced during execution of the application program 160 according to the predetermined reference variable setting 162 (sequences SQ16 and SQ28).
  • the application program execution unit 134 acquires input data (sequence SQ32) and executes the application program 160 (sequence SQ34).
  • the application program execution unit 134 attempts to acquire data from the motion processing unit 132 (sequence SQ36). 132 is acquired (sequence SQ38).
  • execution of application program 160 includes processing that references values retained in previously executed motion processing executions. That is, the process of executing the application program 160 includes the process of referring to the values calculated by executing the motion process within the same control cycle.
  • data that can be referred to by the motion processing unit 132 is requested to be acquired and held in advance in the sequence SQ16 described above.
  • the data held by the motion processing unit 132 may include the feedback value acquired in the current control cycle and the command value calculated by the motion processing unit 132 in the current control cycle.
  • 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). Further, when execution of the application program 160 requires 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 timing at which the image processing device 450 takes an image with the camera 400 . Also, the command generated by executing the application program 160 can reflect the feedback value and command value held by the motion processing unit 132 .
  • the application program execution unit 134 can use 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 executing the processing of the motion processing unit 132 can be referred to in subsequent execution of the application program 160.
  • FIG. 1 the same control cycle T1
  • motion processing unit 132 and application program execution unit 134 each refer to data stored in shared area 148 .
  • 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 this embodiment.
  • 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).
  • the motion processing unit 132 acquires input data for calculating a feedback value (sequence SQ12), calculates the feedback value from the acquired input data, and obtains the calculated feedback value. (sequence SQ14). Motion processing unit 132 then stores the calculated feedback value in shared area 148 of data management unit 142 (sequence SQ48).
  • the execution of the process of the motion processing unit 132 includes the process of storing in the shared area 148 the values to be referenced in the execution of the application program 160 according to the predetermined reference variable settings 162 .
  • the values stored in the shared area 148 can be referenced when the application program 160 is executed.
  • IEC program execution unit 130 acquires input data and internal data (sequence SQ18), executes IEC program 150 (sequence SQ20), and outputs the execution result. , are stored in the data management unit 142 as output data and internal data (sequence SQ22).
  • motion processing unit 132 acquires input data (sequence SQ24), executes target motion processing (sequence SQ26), and outputs the execution result (command value) to Store (sequence SQ28) and store as output data in IO data area 144 and shared area 148 of data management unit 142 (sequence SQ50).
  • the execution of the process of the motion processing unit 132 includes the process of storing in the shared area 148 the values to be referenced in the execution of the application program 160 according to the predetermined reference variable settings 162 .
  • the values stored in the shared area 148 can be referenced when the application program 160 is executed.
  • the application program execution unit 134 acquires input data (sequence SQ32) and executes the application program 160 (sequence SQ34).
  • the application program execution unit 134 needs to refer to the data held by the motion processing unit 132 during the execution process of the application program 160
  • the application program execution unit 134 acquires the data stored in the shared area 148 of the data management unit 142 (sequence SQ52).
  • execution of application program 160 includes processing that refers to values stored in shared area 148 in execution of previously executed processing of motion processor 132 . That is, the process of executing the application program 160 includes the process of referring to the values calculated by executing the motion process within the same control cycle.
  • 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). Further, when execution of the application program 160 requires transmission of a command, the application program execution unit 134 transmits the command to the target robot 200 (sequence SQ42).
  • the application program execution unit 134 can use 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 executing the processing of the motion processing unit 132 can be referred to in subsequent execution of the application program 160.
  • FIG. 1 the same control cycle T1
  • FIG. 11 is a schematic diagram showing an example of a user interface screen provided by support device 600 according to the present embodiment.
  • FIG. 11 shows a user interface screen 650 for generating motion settings 152 (see FIG. 7) for motion processing.
  • the user interface screen 650 accepts the selection of the target axis (in this embodiment, the servomotor 300 driven by the servo driver 350) and accepts the setting of parameters related to the target axis.
  • FIG. 11 shows an example of setting an axis labeled "MC_Axis000(0)".
  • the user interface screen 650 includes a setting reception unit 652 that receives setting values related to speed, acceleration, and torque related to driving the target axis (servo motor 300), and a setting related to the servo motor 300 connected to the servo driver 350. and a setting reception unit 654 that receives setting values.
  • Setting values (parameters) set via the user interface screen 650 are stored as motion settings 152 .
  • FIG. 12 is a schematic diagram showing another example of the 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 settings 162 (see FIG. 7) that define variables that can be referenced when the application program 160 is executed.
  • the user interface screen 660 accepts selection of a target axis (in this embodiment, the servomotor 300 driven by the servo driver 350) and accepts parameter settings related to the target axis.
  • the user interface screen 660 shows "Using_EndenderID” as an object identification display field 663 for identifying an object axis or variable on the application program 160 side.
  • the user sets information for identifying the target axis in association with the desired "Using_EnderID” (axis setting column 664).
  • “MC_Axis000(0)” is associated with the first entry 661 whose “Using_EnderID” is “101”
  • “MC_Axis000(0)” is associated with the second entry 662 whose “Using_EnderID” is “102”. )” is associated.
  • the user interface screen 660 allows setting of which value to use among a plurality of values associated with the target axis. That is, the user interface screen 660 has a data type selection field 665 .
  • the current value of the target axis that is, the feedback value
  • "Actual Position” is selected.
  • "Command Position” is selected.
  • the first entry 661 is assigned the current value (fieldback value) of "MC_Axis000(0)”
  • the second entry 662 is assigned the command value of "MC_Axis000(0)”. is assigned.
  • the reference variable setting 162 includes information that associates variables defined for motion processing with variables defined in the application program 160 .
  • the user interface screen 660 has an update condition setting field 666 for setting conditions for updating the value of each entry.
  • update condition setting column 666 it is possible to set the number of the latch signal set by the procedure described later. If no number is set in the update condition setting field 666, the value will be updated every control cycle.
  • the corresponding value will be updated when the signal of the set number changes (FALSE to TRUE or 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) is the condition for updating the value, and if the number set in the updating condition setting field 666 is negative, the rising edge of the signal. (TRUE to FALSE) is the condition for updating the value.
  • FIG. 13 is a schematic diagram showing still another example of the user interface screen provided by the support device 600 according to the present embodiment.
  • FIG. 13 shows a user interface screen 670 for defining numbers that can be set in the update condition setting field 666 of the user interface screen 660 shown in FIG.
  • the user interface screen 670 includes a source device setting field 673 for setting a device for acquiring an input/output signal that becomes a latch signal, and a port setting field 674 for setting the position of target data among the data held by the set device. , and a number setting field 675 for setting the assigned number.
  • latch number set on the user interface screen 670 can also be referred to by the application program 160 .
  • the contents set on the user interface screens shown in FIGS. 12 and 13 are stored as reference variable settings 162 .
  • FIG. 14 is a schematic diagram showing an example of an application program 160 executed by the control device 100 according to this embodiment.
  • FIG. 14 shows, as an example, a program example in which the robot 200 is caused to move following the conveyor 30 when an imaging trigger is given from the control device 100 to the camera 400 .
  • FIG. 14 shows the code of the robot program written in V+ language as an example. In the V+ language, each instruction is called a "keyword". In the following, a case where "keyword" is used as an example of "instruction" will be described.
  • the application program 160 includes, as an initial setting, a target axis setting code 1601 for specifying the target axis.
  • a target axis setting code 1601 for specifying the target axis.
  • the axis whose "Using_EnderID" is "101” is set to the "num” property of the object "belt”.
  • the application program 160 includes code 1602 for initializing the latch signal of the target axis as initialization.
  • a code 1603 of the application program 160 is an instruction for moving the robot 200 to its initial position.
  • a code 1604 of the application program 160 is an instruction for making various settings.
  • the code 1605 of the application program 160 defines instructions to be executed when predetermined conditions are met.
  • the instruction to be executed consists of a code 1606 for waiting until a signal with a latch number of "4001" is detected (a rising edge or a rising edge occurs), and a current value of the target axis when the signal is detected.
  • It includes code 1607 for acquiring a value 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 in the variable 1609 of "%belt", and in code 1608, a command such as movement based on the variable 1609 (variable %belt) is sent to the robot 200. .
  • the information about the motion axis managed by the motion processing unit 132 can be referred without delay when the IEC program 150 is executed, so that the control performance can be further improved. .
  • the feedback position at time t1 is current value + movement speed of target axis (feedback speed) x (t1-t2).
  • Such current value correction processing may be executed by the system program 111 of the control device 100 .
  • a control device configured to refer to a value calculated by executing the processing of the motion processing unit within the same control cycle in subsequent execution of the second user program.
  • Execution of processing by the motion processing unit includes processing (SQ14, SQ28) for holding values to be referred to in execution of the second user program according to a predetermined setting (162). Control device as described.
  • a program execution method in a control device (100) for controlling a controlled object For each predetermined control cycle (T1), executing (173) a first user program (150) comprising sequence instructions; following execution of the first user program, executing (174) motion processing; repeating (175) the step of executing a second user program (160) following execution of said motion processing;
  • the program execution method, wherein the step of executing the second user program includes a step of referring to values calculated by executing the motion processing within the same control period.
  • T1 predetermined control cycle
  • a first user program comprising sequence instructions
  • motion processing executing a step (175) of repeating the step of executing a second user program following execution of the motion processing
  • the step of executing the second user program includes a step of referring to values calculated by executing the motion processing within the same control cycle.
  • the values calculated by executing the motion processing within the same control period T1 can be referred to in subsequent execution of the application program 160.
  • FIG. Therefore, when controlling the robot 200 by referring to the values (command value and feedback value (current value)) related to a specific axis (device) related to motion processing, it is possible to reduce time lag and fluctuations in data update. . As a result, it is possible to realize more precise control by linking motion processing and robot control.
  • 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 input/output refresh processing, 171 motion input processing, 172 application input processing, 173 IEC program execution processing, 174 motion Execution process, 175 Application execution process, 200 Robot

Abstract

A control device for controlling a control target and including: a first program execution unit that executes a first user program that includes a sequence command; and a second program execution unit that executions a second user program for controlling a robot. The control device is configured so as to repeatedly execute, in order and for each predetermined control cycle, the first user program, processing by a motion processing unit, and the second user program. The control device is also configured such that, in the same control cycle, a value calculated as a result of the processing by the motion processing unit can be referenced during subsequent executions of the second user program.

Description

制御装置、プログラム実行方法およびプログラムController, program execution method and program
 本発明は、制御装置、プログラム実行方法およびプログラムに関する。 The present invention relates to a control device, program execution method and program.
 様々な生産現場において、PLC(プログラマブルコントローラ)などの制御装置を用いたFA(Factory Automation)技術が広く普及している。近年のICT(Information and Communication Technology)の進歩に伴って、制御装置は、従来のシーケンス制御およびモーション制御だけではなく、ロボットや工作機械などを制御することも可能になっている。 FA (Factory Automation) technology using control devices such as PLCs (Programmable Controllers) is widely used in various production sites. With recent advances in ICT (Information and Communication Technology), controllers are now capable of controlling not only conventional sequence control and motion control, but also robots and machine tools.
 例えば、特開2019-036043号公報(特許文献1)は、実行形式の異なる複数種類のプログラムに従う制御演算を単一の制御装置で実現する構成を開示する。 For example, Japanese Patent Laying-Open No. 2019-036043 (Patent Document 1) discloses a configuration in which a single control device realizes control calculations according to a plurality of types of programs with different execution formats.
特開2019-036043号公報JP 2019-036043 A
 例えば、ベルトコンベア上を流れるワークをロボットでピックして、所定位置にプレイスするようなアプリケーションを想定すると、ロボットは、ベルトコンベアの速度に応じて移動させる必要がある。 For example, assuming an application in which a robot picks up a work flowing on a belt conveyor and places it in a predetermined position, the robot must move according to the speed of the belt conveyor.
 本発明の一つの目的は、モーション処理とロボット制御とを連携した制御をより高精度に行うことができる技術を提供することを一つの目的としている。 One of the purposes of the present invention is to provide a technology that enables more precise control in which motion processing and robot control are linked.
 本発明のある局面に従えば、制御対象を制御するための制御装置が提供される。制御装置は、シーケンス命令を含む第1ユーザプログラムを実行する第1プログラム実行部と、モーション処理部と、ロボットを制御するための第2ユーザプログラムを実行する第2プログラム実行部とを含む。第1ユーザプログラムの実行、モーション処理部の処理の実行、第2ユーザプログラムの実行の順番で、予め定められた制御周期毎に繰り返されるように構成されている。同一の制御周期内において、モーション処理部の処理の実行によって計算された値を、後続の第2ユーザプログラムの実行において参照できるように構成されている。 According to one aspect of the present invention, a control device for controlling a controlled object is provided. The controller includes a first program execution unit executing a first user program including sequence instructions, a motion processing unit, and a second program execution unit executing a second user program for controlling the robot. The order of execution of the first user program, execution of the processing of the motion processing unit, and execution of the second user program is configured to be repeated every predetermined control cycle. In the same control cycle, the value calculated by executing the processing of the motion processing section can be referred to in subsequent execution of the second user program.
 この構成によれば、同一の制御周期内において、モーション処理部の処理の実行によって計算された値を、後続のアプリケーションプログラムの実行において参照できるので、モーション処理部の処理に関する値を参照して、第2ユーザプログラムに従って制御対象を制御する場合に、データ更新の時間的ずれや揺らぎを低減できる。これによって、より高精度な制御を実現できる。 According to this configuration, the value calculated by executing the processing of the motion processing unit can be referred to in subsequent execution of the application program within the same control cycle. When controlling the controlled object according to the second user program, it is possible to reduce time shifts and fluctuations in data update. This makes it possible to achieve more precise control.
 モーション処理部の処理の実行は、予め定められた設定に従って、第2ユーザプログラムの実行において参照される対象となる値を保持する処理を含んでいてもよい。この構成によれば、第2ユーザプログラムに実行において参照される値を直接渡すことができる。 Execution of processing by the motion processing unit may include processing for holding a value to be referenced in execution of the second user program according to a predetermined setting. According to this configuration, it is possible to directly pass the value referred to during execution to the second user program.
 第2ユーザプログラムの実行は、先に実行されたモーション処理部の処理の実行において保持された値を参照する処理を含んでいてもよい。この構成によれば、第2ユーザプログラムに実行において、必要な値を参照することができる。 Execution of the second user program may include processing that refers to the value held in the previously executed processing of the motion processing unit. According to this configuration, necessary values can be referred to during execution of the second user program.
 モーション処理部の処理の実行は、予め定められた設定に従って、第2ユーザプログラムの実行において参照される対象となる値を共有領域に格納する処理を含んでいてもよい。この構成によれば、共有領域を介して、第2ユーザプログラムに実行において参照される値を渡すことができる。 Execution of processing by the motion processing unit may include processing for storing, in a shared area, a value to be referenced in execution of the second user program according to a predetermined setting. According to this configuration, it is possible to pass a value referred to during execution to the second user program via the shared area.
 第2ユーザプログラムの実行は、先に実行されたモーション処理部の処理の実行において共有領域に格納された値を参照する処理を含んでいてもよい。この構成によれば、第2ユーザプログラムに実行において、共有領域から必要な値を参照することができる。 Execution of the second user program may include a process of referring to the value stored in the shared area in the previously executed process of the motion processing unit. According to this configuration, necessary values can be referred to from the shared area during execution of the second user program.
 予め定められた設定は、モーション処理部の処理に関して定義された変数と、第2ユーザプログラムにおいて定義された変数とを対応付ける情報を含んでいてもよい。この構成によれば、モーション処理部の処理において参照される値のうち、第2ユーザプログラムで必要となる値を予め設定できる。 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. According to this configuration, among the values referred to in the processing of the motion processing section, the values necessary for the second user program can be set in advance.
 モーション処理部の処理は、対象のデバイスに対する指令値を計算する処理とを含んでいてもよい。この構成によれば、第2ユーザプログラムにおいて、モーション処理部の処理の実行により計算される指令値を参照できる。 The processing of the motion processing unit may include processing of calculating command values for the target device. According to this configuration, the second user program can refer to the command value calculated by executing the processing of the motion processing section.
 第1ユーザプログラムの実行前に、対象のデバイスから現在値を取得する処理が実行されてもよい。この構成によれば、処理の実行前に、今回の制御周期において必要な情報を取得できる。 Before the execution of the first user program, the process of acquiring the current value from the target device may be executed. According to this configuration, necessary information can be acquired in the current control cycle before execution of the process.
 本発明の別の局面に従えば、制御対象を制御するための制御装置におけるプログラム実行方法が提供される。プログラム実行方法は、予め定められた制御周期毎に、シーケンス命令を含む第1ユーザプログラムを実行するステップと、第1ユーザプログラムの実行に続いて、モーション処理を実行するステップと、モーション処理の実行に続いて、第2ユーザプログラムを実行するステップとを繰り返すステップを含む。第2ユーザプログラムを実行するステップは、同一の制御周期内において、モーション処理の実行によって計算された値を参照するステップを含む。 According to another aspect of the present invention, a program execution method in a control device for controlling a controlled object is provided. The program execution method includes steps of executing a first user program including sequence instructions, executing motion processing following execution of the first user program, and executing motion processing, at each predetermined control cycle. followed by repeating the step of executing the second user program. The step of executing the second user program includes the step of referring to the values calculated by executing the motion processing within the same control cycle.
 本発明のさらに別の局面に従えば、制御対象を制御するための制御装置に向けられたプログラムが提供される。プログラムは、制御装置に、予め定められた制御周期毎に、シーケンス命令を含む第1ユーザプログラムを実行するステップと、第1ユーザプログラムの実行に続いて、モーション処理を実行するステップと、モーション処理の実行に続いて、第2ユーザプログラムを実行するステップとを繰り返すステップを実行させる。第2ユーザプログラムを実行するステップは、同一の制御周期内において、モーション処理の実行によって計算された値を参照するステップを含む。 According to still another aspect of the present invention, a program directed to a control device for controlling a controlled object is provided. The program causes the control device to execute a first user program including a sequence command at each predetermined control cycle; execute motion processing following execution of the first user program; is followed by the step of executing the second user program and repeating the step of executing the second user program. The step of executing the second user program includes the step of referring to the values calculated by executing the motion processing within the same control cycle.
 本発明によれば、モーション処理とロボット制御とを連携した制御をより高精度に行うことができる。  According to the present invention, it is possible to perform control with higher precision by linking motion processing and robot control.
本実施の形態に係る制御システムのシステム構成例を示す模式図である。1 is a schematic diagram showing a system configuration example of a control system according to an embodiment; FIG. 本実施の形態に係る制御装置の適用例を示す図である。It is a figure which shows the example of application of the control apparatus which concerns on this Embodiment. 本実施の形態に係る制御システムを構成する制御装置のハードウェア構成例を示す模式図である。FIG. 2 is a schematic diagram showing a hardware configuration example of a control device that configures the control system according to the present embodiment; 本実施の形態に係る制御システムを構成するロボットコントローラのハードウェア構成例を示す模式図である。FIG. 3 is a schematic diagram showing a hardware configuration example of a robot controller that configures the control system according to the present embodiment; 本実施の形態に係る制御システムを構成するサーボドライバのハードウェア構成例を示す模式図である。FIG. 2 is a schematic diagram showing a hardware configuration example of a servo driver that configures the control system according to the embodiment; 本実施の形態に係る制御システムを構成するサポート装置のハードウェア構成例を示す模式図である。FIG. 2 is a schematic diagram showing a hardware configuration example of a support device that configures the control system according to the present embodiment; 本実施の形態に係る制御装置におけるプログラム実行環境に関する構成を示す模式図である。FIG. 3 is a schematic diagram showing the configuration of a program execution environment in the control device according to the embodiment; 本実施の形態に係る制御装置におけるプログラムの実行周期を示す模式図である。FIG. 4 is a schematic diagram showing a program execution cycle in the control device according to the present embodiment; 本実施の形態に係る制御装置においてモーション処理部の処理結果をアプリケーションプログラム実行部の実行に反映する方法の一例を示す模式図である。FIG. 4 is a schematic diagram showing an example of a method of reflecting a processing result of a motion processing section in execution of an application program execution section in the control device according to the present embodiment; 本実施の形態に係る制御装置においてモーション処理部132の処理結果をアプリケーションプログラム実行部の実行に反映する方法の別の一例を示す模式図である。FIG. 9 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; 本実施の形態に係るサポート装置が提供するユーザインターフェイス画面の一例を示す模式図である。FIG. 4 is a schematic diagram showing an example of a user interface screen provided by the support device according to the embodiment; 本実施の形態に係るサポート装置が提供するユーザインターフェイス画面の別の一例を示す模式図である。FIG. 5 is a schematic diagram showing another example of a user interface screen provided by the support device according to the embodiment; 本実施の形態に係るサポート装置が提供するユーザインターフェイス画面のさらに別の一例を示す模式図である。FIG. 9 is a schematic diagram showing still another example of a user interface screen provided by the support device according to the embodiment; 本実施の形態に係る制御装置が実行するアプリケーションプログラム160の一例を示す模式図である。FIG. 3 is a schematic diagram showing an example of an application program 160 executed by a control device according to the embodiment;
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。 Embodiments of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the drawings are given the same reference numerals, and the description thereof will not be repeated.
 <A.適用例>
 まず、本実施の形態に係る制御システム1のシステム構成例について説明する。
<A. Application example>
First, a system configuration example of the control system 1 according to the present embodiment will be described.
 図1は、本実施の形態に係る制御システム1のシステム構成例を示す模式図である。図1には、ロボット200がコンベア30上を流れるワーク2をピックして、所定位置にプレイスする構成例を示す。ロボット200は、コンベア30と実質的に同じ速度で移動した状態でワーク2をピックする。そのため、ロボット200の目標挙動は、コンベア30の移動速度に応じて計算される。 FIG. 1 is a schematic diagram showing a system configuration example of a control system 1 according to this embodiment. FIG. 1 shows a configuration example in which a robot 200 picks up a workpiece 2 flowing on a conveyor 30 and places it at a predetermined position. The robot 200 picks up the work 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 .
 図1を参照して、制御システム1は、制御対象を制御するための制御装置100と、ロボットコントローラ250と、サーボドライバ350と、リモートIO装置500とを含む。これらの装置は、フィールドネットワーク10を介して、データ交換可能に接続される。 Referring to FIG. 1, the control system 1 includes a control device 100 for controlling controlled objects, 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.
 制御装置100は、フィールドネットワーク10に接続されたデバイスとの間で周期的にデータをやり取りして、後述するような処理を実行する。制御装置100は、典型的には、PLC(プログラマブルロジックコントローラ)により実現されてもよい。 The control device 100 periodically exchanges data with devices connected to the field network 10 and executes processing as described later. The control device 100 may typically be realized by a PLC (Programmable Logic Controller).
 ロボットコントローラ250は、ロボット200の制御を担当する。より具体的には、ロボットコントローラ250は、ロボット200との間のインターフェイスとして機能し、制御装置100からの指令に従って、ロボット200を駆動するための指令値を出力するとともに、ロボット200の状態情報を取得して制御装置100へ出力する。 The robot controller 250 is in charge of controlling the robot 200. More specifically, robot controller 250 functions as an interface with robot 200 , outputs command values for driving robot 200 in accordance with commands from control device 100 , and provides state information of robot 200 . It acquires and outputs to the control device 100 .
 ロボット200は、例えば、垂直多関節ロボット、水平多関節(スカラ)ロボット、パラレルリンクロボット、直交ロボットなどの任意のロボットを採用できる。 For the robot 200, any robot such as a vertical articulated robot, a horizontal articulated (scalar) robot, a parallel link robot, or an orthogonal robot can be adopted.
 サーボドライバ350は、コンベア30を駆動するサーボモータ300の制御を担当するとともに、コンベア30と機械的に連結されたエンコーダ310からのエンコーダパルスを受信する。より具体的には、サーボドライバ350は、制御装置100からの指令に従って、サーボモータ300を駆動するとともに、エンコーダ310からのエンコーダパルスをカウントして制御装置100へ出力する。サーボドライバ350は、エンコーダ310からのパルスを受信したパルス数をカウントする。サーボドライバ350のカウント数の変化(単位時間あたりのインクリメント/デクリメント数)から、コンベア30の移動速度を計算できる。 The servo driver 350 is in charge of controlling the servo motor 300 that drives the conveyor 30 and receives encoder pulses from the encoder 310 mechanically connected to the conveyor 30 . More specifically, servo driver 350 drives servo motor 300 according to a command from control device 100 , counts encoder pulses from encoder 310 , and outputs them to control device 100 . Servo driver 350 counts the number of pulses received from 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).
 フィールドネットワーク10には、産業用ネットワーク用のプロトコルである、EtherCAT(登録商標)やEtherNet/IPなどを用いることができる。プロトコルとしてEtherCATを採用した場合には、制御装置100とフィールドネットワーク10に接続されたデバイスとの間で、例えば、数百μ秒~数m秒の定周期でデータを更新できる。 For the field network 10, protocols for industrial networks such as EtherCAT (registered trademark) and EtherNet/IP can be used. 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 several hundred microseconds to several milliseconds, for example.
 制御システム1は、コンベア30を視野範囲に含むカメラ400に接続された画像処理装置450と、表示装置700と、サーバ装置800とをさらに含む。これらの装置は、上位ネットワーク20を介して、制御装置100とデータ交換可能に接続される。上位ネットワーク20には、産業用ネットワーク用のプロトコルであるやEtherNet/IPなどを用いることができる。 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 control device 100 via host network 20 so as to be able to exchange data. For the upper network 20, a protocol for industrial networks such as EtherNet/IP can be used.
 画像処理装置450は、カメラ400により撮像された画像に含まれるワーク2の位置を認識し、認識結果を制御装置100などへ出力する。カメラ400は、リモートIO装置500からの撮像トリガを受け付けると撮像を行う。 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 or the like. The camera 400 takes an image when receiving an imaging trigger from the remote IO device 500 .
 制御装置100には、制御装置100で実行されるユーザプログラム(後述する、IECプログラム150およびアプリケーションプログラム160)のインストールや各種設定を行うためのサポート装置600が接続されてもよい。 The control device 100 may be connected to a support device 600 for installing user programs (the IEC program 150 and the application program 160, which will be described later) executed by the control device 100 and performing various settings.
 図2は、本実施の形態に係る制御装置100の適用例を示す図である。図2を参照して、制御装置100では、IECプログラム実行部130、モーション処理部132、アプリケーションプログラム実行部134の順で処理を実行する。但し、IECプログラム実行部130の処理に先だって、モーション処理部132およびアプリケーションプログラム実行部134は、今回の制御周期T1で利用する入力データを取得する処理とを含む。 FIG. 2 is a diagram showing an application example of the control device 100 according to the present embodiment. Referring to FIG. 2, in control device 100, IEC program execution unit 130, motion processing unit 132, and application program execution unit 134 execute processing in this order. 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 of acquiring input data to be used in the current control cycle T1.
 より具体的には、モーション処理部132は、入力処理(IN)として、フィードバック値(現在値)を取得する。図示していないが、アプリケーションプログラム実行部134についても、入力処理(IN)として、必要な入力データを取得する。 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).
 IECプログラム実行部130の実行後に引き続いて、モーション処理部132は、例えば、モーション命令などを実行して、必要な指令値を計算する。 Following the execution of the IEC program execution unit 130, the motion processing unit 132, for example, executes motion commands and the like to calculate necessary command values.
 本実施の形態に係る制御装置100においては、モーション処理部132の処理の実行後に、アプリケーションプログラム実行部134が処理を実行するため、モーション処理部132が取得したフィードバック値、および、モーション処理部132が計算した指令値をアプリケーションプログラム実行部134の処理の実行時に参照できる。 In control device 100 according to the present embodiment, since application program execution unit 134 executes processing after execution of processing by motion processing unit 132, the feedback value acquired by motion processing unit 132 and the motion processing unit 132 can be referred to when the application program execution unit 134 executes the processing.
 このようなモーション処理部132の実行によって取得あるいは計算される値を参照することで、アプリケーションプログラム160において、より精度の高い制御を実現できる。 By referring to the values obtained or calculated by executing the motion processing unit 132, the application program 160 can achieve more accurate control.
 <B.ハードウェア構成例>
 次に、図1に示す制御システム1を構成する主要装置のハードウェア構成例について説明する。
<B. Hardware configuration example>
Next, an example of hardware configuration of main devices constituting the control system 1 shown in FIG. 1 will be described.
 (b1:制御装置100)
 図3は、本実施の形態に係る制御システム1を構成する制御装置100のハードウェア構成例を示す模式図である。図3を参照して、制御装置100は、プロセッサ102と、メインメモリ104と、ストレージ110と、メモリカードインターフェイス112と、上位ネットワークコントローラ106と、フィールドネットワークコントローラ108と、ローカルバスコントローラ116と、USB(Universal Serial Bus)インターフェイスを提供するUSBコントローラ120とを含む。これらのコンポーネントは、プロセッサバス118を介して接続されている。
(b1: control device 100)
FIG. 3 is a schematic diagram showing a hardware configuration example of the control device 100 that configures the control system 1 according to the present embodiment. Referring to FIG. 3, control device 100 includes processor 102, main memory 104, storage 110, memory card interface 112, host network controller 106, field network controller 108, local bus controller 116, USB and a USB controller 120 that provides a (Universal Serial Bus) interface. These components are connected via processor bus 118 .
 プロセッサ102は、制御演算を実行する演算処理部に相当し、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)などで構成される。具体的には、プロセッサ102は、ストレージ110に格納されたプログラムを読み出して、メインメモリ104に展開して実行することで、制御対象に対する制御演算を実現する。 The processor 102 corresponds to an arithmetic processing unit that executes control arithmetic, and is composed of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), and the like. Specifically, the processor 102 reads a program stored in the storage 110, develops it in the main memory 104, and executes it, thereby implementing control calculations for the controlled object.
 メインメモリ104は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成される。ストレージ110は、例えば、SSD(Solid State Drive)やHDD(Hard Disk Drive)などの不揮発性記憶装置などで構成される。 The main memory 104 is composed of volatile storage devices such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory). The storage 110 is configured by, for example, a non-volatile storage device such as SSD (Solid State Drive) or HDD (Hard Disk Drive).
 ストレージ110には、基本的な機能を実現するためのシステムプログラム111、および、制御対象に応じて作成されたIECプログラム150およびアプリケーションプログラム160などが格納される。 The storage 110 stores a system program 111 for realizing basic functions, an IEC program 150 and an application program 160 created according to the object to be controlled.
 IECプログラム150は、第1ユーザプログラムに相当し、制御システム1におけるロボット200の制御以外の主たる制御を実現するための命令を含む。IECプログラム150は、典型的には、シーケンス命令およびモーション命令を含み得る。IECプログラム150は、国際電気標準会議(IEC:International Electrotechnical Commission)が定めるIEC61131-3で規定されるいずれかの言語で記述されてもよう。但し、IECプログラム150は、IEC61131-3で規定される言語以外のメーカ独自言語で記述されるプログラムを含んでいてもよい。 The IEC program 150 corresponds to a first user program, and includes instructions for realizing main control other than control of the robot 200 in the control system 1 . An IEC program 150 may typically include sequence instructions and motion instructions. The IEC program 150 may be written in any language defined by IEC61131-3 defined by the International Electrotechnical Commission (IEC). However, the IEC program 150 may include a program written in a manufacturer's own language other than the language defined by IEC61131-3.
 アプリケーションプログラム160は、第2ユーザプログラムに相当し、ロボット200を制御するための命令を含む。アプリケーションプログラム160は、所定のプログラミング言語(例えば、V+言語などのロボット制御用プログラミング言語やGコードなどのNC制御に係るプログラミング言語)で記述された命令を含んでいてもよい。 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, programming language for robot control such as V+ language or programming language for NC control such as G code).
 メモリカードインターフェイス112は、着脱可能な記憶媒体の一例であるメモリカード114を受け付ける。メモリカードインターフェイス112は、メモリカード114に対して任意のデータの読み書きが可能になっている。 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/writing arbitrary data from/to the memory card 114 .
 上位ネットワークコントローラ106は、上位ネットワーク20を介して、任意の情報処理装置(図1に示される表示装置700およびサーバ装置800など)との間でデータをやり取りする。 The host network controller 106 exchanges data with arbitrary information processing devices (such as the display device 700 and the server device 800 shown in FIG. 1) via the host network 20 .
 フィールドネットワークコントローラ108は、フィールドネットワーク10を介して、それぞれのデバイスとの間でデータをやり取りする。図1に示すシステム構成例において、フィールドネットワークコントローラ108は、フィールドネットワーク10の通信マスタとして機能してもよい。 The field network controller 108 exchanges data with each device via the field network 10. In the system configuration example shown in FIG. 1 , the field network controller 108 may function as a communication master of the field network 10 .
 ローカルバスコントローラ116は、ローカルバス122を介して、制御装置100に含まれる任意の機能ユニット124との間でデータをやり取りする。機能ユニット124は、例えば、アナログ信号の入力および/または出力を担当するアナログI/Oユニット、デジタル信号の入力および/または出力を担当するデジタルI/Oユニットなどからなる。 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 units 124 may include, for example, analog I/O units for inputting and/or outputting analog signals, digital I/O units for inputting and/or outputting digital signals, and the like.
 USBコントローラ120は、USB接続を介して、任意の情報処理装置(サポート装置600など)との間でデータをやり取りする。 The USB controller 120 exchanges data with any information processing device (such as the support device 600) via a USB connection.
 (b2:ロボットコントローラ250)
 図4は、本実施の形態に係る制御システム1を構成するロボットコントローラ250のハードウェア構成例を示す模式図である。図4を参照して、ロボットコントローラ250は、フィールドネットワークコントローラ252と、制御処理回路260とを含む。
(b2: robot controller 250)
FIG. 4 is a schematic diagram showing a hardware configuration example of the robot controller 250 that configures the control system 1 according to this embodiment. Referring to FIG. 4, robot controller 250 includes field network controller 252 and control processing circuit 260 .
 フィールドネットワークコントローラ252は、フィールドネットワーク10を介して、主として、制御装置100との間でデータをやり取りする。すなわち、フィールドネットワークコントローラ252は、制御装置100とフィールドネットワーク10を介して接続するためのインターフェイスに相当する。 The field network controller 252 mainly exchanges data with the control device 100 via the field network 10 . That is, field network controller 252 corresponds to an interface for connecting control device 100 via field network 10 .
 制御処理回路260は、ロボット200を駆動するために必要な演算処理を実行する。一例として、制御処理回路260は、プロセッサ262と、メインメモリ264と、ストレージ266と、インターフェイス回路270とを含む。 The control processing circuit 260 executes arithmetic processing required to drive the robot 200 . As an example, control processing circuitry 260 includes processor 262 , main memory 264 , storage 266 and interface circuitry 270 .
 プロセッサ262は、ロボット200を駆動するための制御演算を実行する。メインメモリ264は、例えば、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ266は、例えば、SSDやHDDなどの不揮発性記憶装置などで構成される。 A processor 262 executes control operations for driving the robot 200 . The main memory 264 is composed of, for example, a volatile memory device such as DRAM or SRAM. The storage 266 is configured by, for example, a non-volatile storage device such as SSD or HDD.
 ストレージ266には、ロボット200を駆動するための制御を実現するためのシステムプログラム268が格納される。システムプログラム268は、ロボット200の動作に係る制御演算を実行する命令、および、ロボット200との間のインターフェイスに係る命令を含む。 A system program 268 for realizing control for driving the robot 200 is stored in the storage 266 . The system program 268 includes instructions for executing control operations related to the operation of the robot 200 and instructions related to interfacing with the robot 200 .
 インターフェイス回路270は、ロボット200との間でデータをやり取りする。
 (b3:サーボドライバ350)
 図5は、本実施の形態に係る制御システム1を構成するサーボドライバ350のハードウェア構成例を示す模式図である。図5を参照して、サーボドライバ350は、フィールドネットワークコントローラ352と、制御処理回路360と、ドライブ回路370と、カウンタ回路372とを含む。
Interface circuit 270 exchanges data with robot 200 .
(b3: servo driver 350)
FIG. 5 is a schematic diagram showing a hardware configuration example of the servo driver 350 that configures the control system 1 according to this embodiment. Referring to FIG. 5, servo driver 350 includes field network controller 352 , control processing circuit 360 , drive circuit 370 and counter circuit 372 .
 フィールドネットワークコントローラ352は、フィールドネットワーク10を介して、主として、制御装置100との間でデータをやり取りする。 The field network controller 352 mainly exchanges data with the control device 100 via the field network 10 .
 制御処理回路360は、サーボモータ300の制御に必要な演算処理を実行する。一例として、制御処理回路360は、プロセッサ362と、メインメモリ364と、ストレージ366とを含む。 The control processing circuit 360 executes arithmetic processing necessary for controlling the servo motor 300 . As an example, control processing circuitry 360 includes processor 362 , main memory 364 , and storage 366 .
 プロセッサ362は、サーボモータ300に係る制御演算を実行する。メインメモリ364は、例えば、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ366は、例えば、SSDやHDDなどの不揮発性記憶装置などで構成される。 The processor 362 executes control calculations related to the servomotor 300 . The main memory 364 is composed of, for example, a volatile memory device such as DRAM or SRAM. The storage 366 is configured by, for example, a non-volatile storage device such as SSD or HDD.
 ストレージ366には、サーボモータ300の駆動制御を実現するためのシステムプログラム368が格納される。システムプログラム368は、サーボモータ300の動作に係る制御演算を実行する命令、および、サーボモータ300との間のインターフェイスに係る命令を含む。 The storage 366 stores a system program 368 for realizing drive control of the servo motor 300 . The system program 368 includes instructions for executing control calculations related to the operation of the servomotor 300 and instructions related to interfacing with the servomotor 300 .
 ドライブ回路370は、コンバータ回路およびインバータ回路などを含み、制御処理回路360により計算された指令に従って、指定された電圧・電流・位相の電力を生成して、サーボモータ300へ供給する。 The drive circuit 370 includes a converter circuit, an inverter circuit, and the like, and according to commands calculated by the control processing circuit 360, generates power of specified voltage, current, and phase, and supplies it to the servo motor 300.
 カウンタ回路372は、エンコーダ310からのパルスを受信するA/D回路およびレジスタなどを含む。 The counter circuit 372 includes an A/D circuit that receives pulses from the encoder 310, a register, and the like.
 (b4:画像処理装置450)
 本実施の形態に係る制御システム1を構成する画像処理装置450は、一例として、汎用パソコンを用いて実現されてもよい。画像処理装置450の基本的なハードウェア構成例は、周知であるので、ここでは詳細な説明は行わない。
(b4: image processing device 450)
The image processing device 450 that configures the control system 1 according to the present embodiment may be realized using a general-purpose personal computer as an example. A basic hardware configuration example of the image processing device 450 is well known, and therefore detailed description thereof is omitted here.
 (b5:リモートIO装置500)
 本実施の形態に係る制御システム1を構成するリモートIO装置500は、図5に示すサーボドライバ350と同様に、フィールドネットワークコントローラおよび制御処理回路を含むとともに、制御対象からの信号を取得し、および/または、制御対象へ信号を出力するユニットを含む。リモートIO装置500は、例えば、アナログ信号の入力および/または出力を担当するアナログI/Oユニット、デジタル信号の入力および/または出力を担当するデジタルI/Oユニットなどが装着されてもよい。
(b5: remote IO device 500)
Remote IO device 500 constituting control system 1 according to the present embodiment includes a field network controller and a control processing circuit, similarly to servo driver 350 shown in FIG. /or includes a unit that outputs a signal to a controlled object. The remote IO device 500 may be equipped with, for example, an analog I/O unit for inputting and/or outputting analog signals, a digital I/O unit for inputting and/or outputting digital signals, and the like.
 (b6:サポート装置600)
 本実施の形態に係る制御システム1を構成するサポート装置600は、一例として、汎用パソコンを用いて実現されてもよい。
(b6: support device 600)
The support device 600 that configures the control system 1 according to the present embodiment may be realized using a general-purpose personal computer as an example.
 図6は、本実施の形態に係る制御システム1を構成するサポート装置600のハードウェア構成例を示す模式図である。図6を参照して、サポート装置600は、CPUやMPUなどのプロセッサ602と、メインメモリ604と、入力部606と、表示部608と、ストレージ610と、ネットワークコントローラ616と、USBコントローラ618と、光学ドライブ620とを含む。これらのコンポーネントはバス624を介して接続される。 FIG. 6 is a schematic diagram showing a hardware configuration example of the support device 600 that configures the control system 1 according to the present embodiment. 6, support device 600 includes processor 602 such as a CPU or MPU, main memory 604, input unit 606, display unit 608, storage 610, network controller 616, USB controller 618, and an optical drive 620 . These components are connected via bus 624 .
 プロセッサ602は、ストレージ610に格納された各種プログラムを読み出して、メインメモリ604に展開して実行することで、制御装置100で実行されるユーザプログラム(IECプログラム150およびアプリケーションプログラム160)の開発などの処理を提供する。 The processor 602 reads out various programs stored in the storage 610 , develops them in the main memory 604 and executes them, thereby developing user programs (IEC programs 150 and application programs 160 ) executed by the control device 100 . Provide processing.
 ストレージ610は、例えば、SSDやHDDなどの不揮発性記憶装置などで構成される。ストレージ610には、典型的には、OS612と、制御装置100において実行されるユーザプログラムの作成、作成したユーザプログラムのデバッグ、システム構成の定義、各種パラメータの設定などを行うための開発プログラム614とが格納される。ストレージ610には、図6に示すプログラム以外の必要なプログラムが格納されてもよい。 The storage 610 is composed of, for example, non-volatile storage devices such as SSDs and HDDs. The storage 610 typically includes an OS 612, a development program 614 for creating a user program to be executed in the control device 100, debugging the created user program, defining the system configuration, setting various parameters, and the like. is stored. The storage 610 may store necessary programs other than the programs shown in FIG.
 入力部606は、キーボードやマウスなどで構成され、ユーザ操作を受け付ける。表示部608は、ディスプレイ、各種インジケータ、プリンタなどで構成され、プロセッサ602からの処理結果などを出力する。 The input unit 606 is composed of a keyboard, mouse, etc., and receives user operations. A display unit 608 includes a display, various indicators, a printer, and the like, and outputs processing results from the processor 602 and the like.
 ネットワークコントローラ616は、任意のネットワークを介した他の装置との間のデータのやり取りを制御する。USBコントローラ618は、USB接続を介して制御装置100との間のデータのやり取りを制御する。 A network controller 616 controls the exchange of data with other devices via any network. A USB controller 618 controls data exchange with the control device 100 via a USB connection.
 サポート装置600は、光学ドライブ620を有しており、コンピュータ読取可能なプログラムを非一過的に格納する記録媒体622(例えば、DVD(Digital Versatile Disc)などの光学記録媒体)から、その中に格納されたプログラムが読取られてストレージ610などにインストールされる。 The support device 600 has an optical drive 620, and from a recording medium 622 (for example, an optical recording medium such as a DVD (Digital Versatile Disc)) that stores a computer-readable program non-transitory. The stored program is read and installed in the storage 610 or the like.
 サポート装置600で実行される各種プログラムは、コンピュータ読取可能な記録媒体622を介してインストールされてもよいが、ネットワーク上のサーバ装置などからダウンロードする形でインストールするようにしてもよい。また、本実施の形態に係るサポート装置600が提供する機能は、OS612が提供するモジュールの一部を利用する形で実現される場合もある。 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 the network. Also, 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 .
 (b7:表示装置700)
 本実施の形態に係る制御システム1を構成する表示装置700は、一例として、汎用パソコンを用いて実現されてもよい。表示装置700の基本的なハードウェア構成例は、周知であるので、ここでは詳細な説明は行わない。
(b7: display device 700)
Display device 700 configuring control system 1 according to the present embodiment may be realized using a general-purpose personal computer as an example. Since the basic hardware configuration example of the display device 700 is well known, detailed description thereof will not be given here.
 (b8:サーバ装置800)
 本実施の形態に係る制御システム1を構成するサーバ装置800は、一例として汎用パソコンを用いて実現されてもよい。サーバ装置800の基本的なハードウェア構成例は、周知であるので、ここでは詳細な説明は行わない。
(b8: server device 800)
Server device 800 that configures control system 1 according to the present embodiment may be implemented using a general-purpose personal computer as an example. Since the basic hardware configuration example of the server device 800 is well known, detailed description thereof will not be given here.
 (b9:その他の形態)
 図3~図6には、1または複数のプロセッサがプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASIC(Application Specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)など)を用いて実装してもよい。
(b9: other forms)
3 to 6 show configuration examples in which one or more processors execute programs to provide necessary functions. It may be implemented using a hardware circuit (for example, ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array)).
 <C.IECプログラムおよびアプリケーションプログラムの実行>
 次に、本実施の形態に係る制御装置100におけるIECプログラム150およびアプリケーションプログラム160の実行について説明する。
<C. Execution of IEC Program and Application Program>
Next, execution of IEC program 150 and application program 160 in control device 100 according to the present embodiment will be described.
 図7は、本実施の形態に係る制御装置100におけるプログラム実行環境に関する構成を示す模式図である。図7を参照して、制御装置100は、IECプログラム実行部130と、アプリケーションプログラム実行部134と、データ管理部142とを含む。 FIG. 7 is a schematic diagram showing the configuration of the program execution environment in control device 100 according to the present embodiment. Referring to FIG. 7 , control device 100 includes an IEC program executing portion 130 , an application program executing portion 134 and a data managing portion 142 .
 IECプログラム実行部130は、シーケンス命令を含むIECプログラム150(第1ユーザプログラム)を周期的に実行する第1プログラム実行部に相当する。IECプログラム実行部130は、モーション処理部132を有しており、モーション設定152に従って、IECプログラム150に含まれるモーション命令などを実行する。 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 instructions. 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 motion settings 152 .
 アプリケーションプログラム実行部134は、ロボット200を制御するためのアプリケーションプログラム160(第2ユーザプログラム)を実行する第2プログラム実行部に相当する。アプリケーションプログラム実行部134は、参照変数設定162に従って、アプリケーションプログラム160を実行する。アプリケーションプログラム実行部134は、インタプリタ136と、キャッシュ138と、コマンド送信部140とを含む。 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 . Application program execution unit 134 executes application program 160 according to reference variable setting 162 . Application program execution unit 134 includes interpreter 136 , cache 138 , and command transmission unit 140 .
 インタプリタ136は、アプリケーションプログラム160を逐次解釈して中間コードを生成する。生成された中間コードは、キャッシュ138にキューイング(エンキュー)される。コマンド送信部140は、キャッシュ138にキューイングされた中間コードを都度参照して指令を対象のロボット200に送信する。 The interpreter 136 sequentially interprets the application program 160 to generate intermediate code. The generated intermediate code is queued (enqueued) in the 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 .
 データ管理部142は、プログラム実行に必要なデータを保持する。データ管理部142が保持するデータは、予め定められた周期でリフレッシュ(更新)される。データ管理部142は、入出力データを保持するためのIOデータ領域144と、制御装置100の内部で使用されるワーキングデータを保持するための内部データ領域146および共有領域148とを含む。共有領域148には、IECプログラム実行部130およびアプリケーションプログラム実行部134が共通に参照可能なデータが格納される。データ管理部142は、データを変数の形で管理するようにしてもよい。 The data management unit 142 holds data necessary for program execution. The data held by the data management unit 142 is refreshed (updated) at predetermined intervals. The data management unit 142 includes an IO data area 144 for holding input/output data, an internal data area 146 and a shared area 148 for holding working data used inside the control device 100 . Shared area 148 stores data that can be commonly referred to by IEC program execution unit 130 and application program execution unit 134 . The data management unit 142 may manage data in the form of variables.
 図8は、本実施の形態に係る制御装置100におけるプログラムの実行周期を示す模式図である。図8を参照して、制御装置100は、入出力リフレッシュ処理170、モーション入力処理171、アプリケーション入力処理172、IECプログラム実行処理173、モーション実行処理174、アプリケーション実行処理175の順で、制御周期T1毎にサイクリック実行する。 FIG. 8 is a schematic diagram showing a program execution cycle in the control device 100 according to the present embodiment. Referring to FIG. 8, control device 100 performs 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 the order of control period T1. Cyclic execution every time.
 入出力リフレッシュ処理170は、前回の制御周期T1で計算した出力データ(指令値)を出力する処理と、今回の制御周期で利用する入力データを取得する処理とを含む。 The input/output refresh process 170 includes a process of outputting the output data (command value) calculated in the previous control cycle T1 and a process of acquiring the input data used in the current control cycle.
 モーション入力処理171は、モーション処理部132での処理に必要なデータを取得する処理を含む。このように、IECプログラム150の実行前に、対象のデバイス(対象軸)から現在値を取得する処理が実行される。 The motion input processing 171 includes processing for acquiring data necessary for processing in the motion processing unit 132. In this way, before the IEC program 150 is executed, the process of acquiring the current value from the target device (target axis) is executed.
 アプリケーション入力処理172は、アプリケーションプログラム実行部134での処理に必要なデータを取得する処理を含む。 The application input processing 172 includes processing for acquiring data necessary for processing in the application program execution unit 134.
 IECプログラム実行処理173は、IECプログラム150の実行処理に相当し、IECプログラム150に従って、入力データおよび内部データから、出力データおよび新たな内部データを計算する処理を含む。 The IEC program execution processing 173 corresponds to the execution processing of the IEC program 150, and includes processing of calculating output data and new internal data from input data and internal data according to the IEC program 150.
 モーション実行処理174は、モーション処理部132の処理の実行に相当し、例えば、IECプログラム150に含まれるモーション命令の実行処理などを含む。モーション処理部132からの処理結果を出力する処理を含む。典型的には、モーション実行処理174は、対象のデバイス(対象軸)に対する指令値を計算する処理を含む。 The motion execution processing 174 corresponds to execution of processing by the motion processing unit 132, and includes, for example, execution processing of motion commands included in the IEC program 150. It includes processing for outputting the processing result from the motion processing unit 132 . Typically, motion execution processing 174 includes processing to calculate command values for target devices (target axes).
 アプリケーション実行処理175は、アプリケーションプログラム160の実行処理に相当し、アプリケーションプログラム実行部134での命令実行およびアプリケーションプログラム実行部134からの処理結果を出力する処理(ロボット200にコマンドを送信する処理)を含む。 The application execution processing 175 corresponds to the execution processing of the application program 160, and performs command execution by the application program execution unit 134 and processing for outputting the processing result from the application program execution unit 134 (processing for transmitting a command to the robot 200). include.
 このように、制御装置100においては、IECプログラム150(第1ユーザプログラム)の実行、モーション処理部132の処理の実行、アプリケーションプログラム160の実行の順番で、予め定められた制御周期T1毎に繰り返される。 As described above, in the control device 100, the execution of the IEC program 150 (first user program), the execution of the processing of the motion processing unit 132, and the execution of the application program 160 are repeated every predetermined control period T1 in this order. be
 制御装置100は、IECプログラム150の実行、モーション処理部132の処理の実行、アプリケーションプログラム160の実行を制御周期T1毎に繰り返し実行するため、同じ制御周期T1内で、モーション処理部132による処理結果をアプリケーションプログラム160に反映できる。これによって、制御装置100は、同一の制御周期T1内において、モーション処理部132の処理の実行によって計算された値を、後続のアプリケーションプログラム160の実行において参照できるようになっている。 Since the control device 100 repeatedly executes the execution of the IEC program 150, the execution of the processing of the motion processing unit 132, and the execution of the application program 160 every control cycle T1, the processing result of the motion processing unit 132 is obtained within the same control cycle T1. can be reflected in the application program 160 . As a result, the control device 100 can refer to the values calculated by executing the processing of the motion processing section 132 within the same control period T1 in subsequent execution of the application program 160 .
 <D.モーション処理部が管理する情報のアプリケーション実行部での参照>
 上述したように、本実施の形態に係る制御装置100は、モーション処理部132の処理結果をアプリケーションプログラム実行部134での実行に反映できる。以下では、一例として、コンベア30の移動速度(エンコーダ310からの単位時間あたりパルス数)に応じて、ロボット200の移動速度などを調整する例について説明する。なお、コンベア30の移動速度は、モーション処理部132の処理の実行によって計算される。
<D. Referencing Information Managed by Motion Processing Unit in Application Execution Unit>
As described above, control device 100 according to the present embodiment can reflect the processing result of motion processing unit 132 in execution by application program execution unit 134 . 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 below. Note that the moving speed of the conveyor 30 is calculated by executing the processing of the motion processing unit 132 .
 (d1:データ交換方式)
 まず、モーション処理部132とアプリケーションプログラム実行部134との間でデータを交換する方式について説明する。この方式では、モーション処理部132が保持するデータ(フィールドバック値および指令値)をアプリケーションプログラム実行部134が参照する。
(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 .
 図9は、本実施の形態に係る制御装置100においてモーション処理部132の処理結果をアプリケーションプログラム実行部134の実行に反映する方法の一例を示す模式図である。図9には、制御周期T1における処理およびデータのやり取りを示す。図9に示す一連の処理は、プロセッサ102がシステムプログラム111を実行することで実現されるユーザプログラムの実行環境下で実現される。すなわち、システムプログラム111は、制御装置100での後述するような処理を実現するための基本的な環境を提供する。図10に示す一連の処理についても同様である。 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 processing and data exchange in the control cycle T1. A series of processes shown in FIG. 9 are realized under the execution environment of the 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 processing in the control device 100, which will be described later. The same applies to the series of processes shown in FIG.
 図9を参照して、入出力リフレッシュ処理170(図8参照)により、データ管理部142のIOデータ領域144に保持される入出力データが更新される(シーケンスSQ10)。 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).
 モーション入力処理171(図8参照)において、モーション処理部132は、フィードバック値を算出するための入力データを取得する(シーケンスSQ12)。入力データは、モーション処理の対象となるデバイス(対象軸)の状態値を含んでいてもよい。そして、モーション処理部132は、取得した入力データからフィードバック値を計算し、計算したフィールドバック値で更新する(シーケンスSQ14)。典型的には、フィールドバック値は、コンベア30の移動速度の実績値である。なお、更新される対象のデータは、アプリケーションプログラム実行部134から予め取得および保持が依頼されている値を含む(後述のシーケンスSQ16を参照)。 In the motion input processing 171 (see FIG. 8), the motion processing unit 132 acquires input data for calculating feedback values (sequence SQ12). The input data may include state values of a device (target axis) targeted for motion processing. 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 the actual value of the moving speed of conveyor 30 . Note that the data to be updated includes values that have been requested to be acquired and held in advance by application program execution unit 134 (see sequence SQ16 described later).
 続いて、アプリケーション入力処理172(図8参照)において、アプリケーションプログラム実行部134は、後続のアプリケーション実行処理175(図8参照)において、モーション処理に関する必要なデータを利用できるように、モーション処理部132に対して、データの取得および保持を依頼する(シーケンスSQ16)。この依頼は、次の制御周期において実行されることになる。対象のデータは、参照変数設定162(図7参照)に定義される。 Subsequently, in the application input processing 172 (see FIG. 8), the application program execution unit 134 causes the motion processing unit 134 to use necessary data related to motion processing in subsequent application execution processing 175 (see FIG. 8). is requested to acquire and hold data (sequence SQ16). This request will be executed in the next control cycle. The data of interest is defined in reference variable settings 162 (see FIG. 7).
 したがって、モーション入力処理171は、予め定められた参照変数設定162に従って、アプリケーションプログラム160の実行において参照される対象となる値を保持する処理を含む(シーケンスSQ14およびSQ16)。 Therefore, the motion input processing 171 includes processing for holding values to be referenced during execution of the application program 160 according to the predetermined reference variable setting 162 (sequences SQ14 and SQ16).
 続いて、IECプログラム実行処理173(図8参照)において、IECプログラム実行部130は、入力データおよび内部データを取得し(シーケンスSQ18)、IECプログラム150を実行し(シーケンスSQ20)、その実行結果を、データ管理部142に出力データおよび内部データとして格納する(シーケンスSQ22)。 Subsequently, in IEC program execution processing 173 (see FIG. 8), IEC program execution unit 130 acquires input data and internal data (sequence SQ18), executes IEC program 150 (sequence SQ20), and outputs the execution result. , are stored in the data management unit 142 as output data and internal data (sequence SQ22).
 続いて、モーション実行処理174(図8参照)において、モーション処理部132は、入力データを取得し(シーケンスSQ24)、対象のモーション処理を実行し(シーケンスSQ26)、その実行結果(指令値)で更新する(シーケンスSQ28)とともに、データ管理部142のIOデータ領域144に出力データとして格納する(シーケンスSQ30)。なお、更新される対象のデータは、アプリケーションプログラム実行部134から予め取得および保持が依頼されている値を含む(シーケンスSQ16を参照)。 Subsequently, in the motion execution processing 174 (see FIG. 8), the motion processing unit 132 acquires input data (sequence SQ24), executes target motion processing (sequence SQ26), and executes the execution result (command value). It is updated (sequence SQ28) and stored 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 to be acquired and held in advance by application program execution unit 134 (see sequence SQ16).
 したがって、モーション実行処理174は、予め定められた参照変数設定162に従って、アプリケーションプログラム160の実行において参照される対象となる値を保持する処理を含む(シーケンスSQ16およびSQ28)。 Therefore, the motion execution processing 174 includes processing for holding values to be referenced during execution of the application program 160 according to the predetermined reference variable setting 162 (sequences SQ16 and SQ28).
 続いて、アプリケーション実行処理175(図8参照)において、アプリケーションプログラム実行部134は、入力データを取得し(シーケンスSQ32)、アプリケーションプログラム160を実行する(シーケンスSQ34)。アプリケーションプログラム実行部134は、アプリケーションプログラム160の実行過程において、モーション処理部132が保持するデータの参照が必要になると、モーション処理部132に対してデータの取得を試み(シーケンスSQ36)、モーション処理部132が保持するデータを取得する(シーケンスSQ38)。このように、アプリケーションプログラム160の実行は、先に実行されたモーション処理の実行において保持された値を参照する処理を含む。すなわち、アプリケーションプログラム160を実行する処理は、同一の制御周期内において、モーション処理の実行によって計算された値を参照する処理を含む。 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). When the application program execution unit 134 needs to refer to the data held by the motion processing unit 132 in the process of executing the application program 160, the application program execution unit 134 attempts to acquire data from the motion processing unit 132 (sequence SQ36). 132 is acquired (sequence SQ38). Thus, execution of application program 160 includes processing that references values retained in previously executed motion processing executions. That is, the process of executing the application program 160 includes the process of referring to the values calculated by executing the motion process within the same control cycle.
 なお、モーション処理部132から参照できるデータは、上述のシーケンスSQ16において、予め取得および保持が要求されている。モーション処理部132が保持するデータとしては、今回の制御周期で取得されたフィールドバック値、および、今回の制御周期でモーション処理部132が計算した指令値を含んでいてもよい。 It should be noted that data that can be referred to by the motion processing unit 132 is requested to be acquired and held in advance in the sequence SQ16 described above. The data held by the motion processing unit 132 may include the feedback value acquired in the current control cycle and the command value calculated by the motion processing unit 132 in the current control cycle.
 そして、アプリケーションプログラム実行部134は、アプリケーションプログラム160の実行結果をデータ管理部142のIOデータ領域144に出力データとして格納する(シーケンスSQ40)。また、アプリケーションプログラム実行部134は、アプリケーションプログラム160の実行によってコマンドの送信が必要になると、当該コマンドを対象のロボット200へ送信する(シーケンスSQ42)。出力データは、画像処理装置450がカメラ400で撮像するタイミングを指示する撮像トリガを含めることもできる。また、アプリケーションプログラム160の実行によって生成されるコマンドには、モーション処理部132が保持するフィールドバック値および指令値を反映することもできる。 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). Further, when execution of the application program 160 requires 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 timing at which the image processing device 450 takes an image with the camera 400 . Also, the command generated by executing the application program 160 can reflect the feedback value and command value held by the motion processing unit 132 .
 上述したような処理手順によって、アプリケーションプログラム実行部134は、同じ制御周期においてモーション処理部132が取得および生成したデータを利用して、必要な処理およびコマンドの生成を行うことができる。すなわち、同一の制御周期T1内において、モーション処理部132の処理の実行によって計算された値を、後続のアプリケーションプログラム160の実行において参照できるようになっている。 By the processing procedure as described above, the application program execution unit 134 can use 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 executing the processing of the motion processing unit 132 can be referred to in subsequent execution of the application program 160. FIG.
 (d2:共有データ参照方式)
 次に、モーション処理部132とアプリケーションプログラム実行部134との間で共有データを参照する方式について説明する。この方式では、モーション処理部132およびアプリケーションプログラム実行部134は、共有領域148に格納されたデータをそれぞれが参照する。
(d2: shared data reference method)
Next, a method of referring to shared data between the motion processing unit 132 and the application program execution unit 134 will be described. In this method, motion processing unit 132 and application program execution unit 134 each refer to data stored in shared area 148 .
 図10は、本実施の形態に係る制御装置100においてモーション処理部132の処理結果をアプリケーションプログラム実行部134の実行に反映する方法の別の一例を示す模式図である。 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 this embodiment.
 図10を参照して、入出力リフレッシュ処理170(図8参照)により、データ管理部142のIOデータ領域144に保持される入出力データが更新される(シーケンスSQ10)。 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).
 モーション入力処理171(図8参照)において、モーション処理部132は、フィードバック値を算出するための入力データを取得し(シーケンスSQ12)、取得した入力データからフィードバック値を計算し、計算したフィールドバック値で更新する(シーケンスSQ14)。そして、モーション処理部132は、計算したフィールドバック値をデータ管理部142の共有領域148に格納する(シーケンスSQ48)。 In the motion input processing 171 (see FIG. 8), the motion processing unit 132 acquires input data for calculating a feedback value (sequence SQ12), calculates the feedback value from the acquired input data, and obtains the calculated feedback value. (sequence SQ14). Motion processing unit 132 then stores the calculated feedback value in shared area 148 of data management unit 142 (sequence SQ48).
 このように、モーション処理部132の処理の実行は、予め定められた参照変数設定162に従って、アプリケーションプログラム160の実行において参照される対象となる値を共有領域148に格納する処理を含む。共有領域148に格納された値は、アプリケーションプログラム160の実行において参照可能になっている。 In this way, the execution of the process of the motion processing unit 132 includes the process of storing in the shared area 148 the values to be referenced in the execution of the application program 160 according to the predetermined reference variable settings 162 . The values stored in the shared area 148 can be referenced when the application program 160 is executed.
 図10に示す処理手順においては、アプリケーション入力処理172(図8参照)において実質的な処理は行われない。 In the processing procedure shown in FIG. 10, no substantial processing is performed in the application input processing 172 (see FIG. 8).
 続いて、IECプログラム実行処理173(図8参照)において、IECプログラム実行部130は、入力データおよび内部データを取得し(シーケンスSQ18)、IECプログラム150を実行し(シーケンスSQ20)、その実行結果を、データ管理部142に出力データおよび内部データとして格納する(シーケンスSQ22)。 Subsequently, in IEC program execution processing 173 (see FIG. 8), IEC program execution unit 130 acquires input data and internal data (sequence SQ18), executes IEC program 150 (sequence SQ20), and outputs the execution result. , are stored in the data management unit 142 as output data and internal data (sequence SQ22).
 続いて、モーション実行処理174(図8参照)において、モーション処理部132は、入力データを取得し(シーケンスSQ24)、対象のモーション処理を実行し(シーケンスSQ26)、その実行結果(指令値)を格納する(シーケンスSQ28)とともに、データ管理部142のIOデータ領域144および共有領域148に出力データとして格納する(シーケンスSQ50)。 Subsequently, in motion execution processing 174 (see FIG. 8), motion processing unit 132 acquires input data (sequence SQ24), executes target motion processing (sequence SQ26), and outputs the execution result (command value) to Store (sequence SQ28) and store as output data in IO data area 144 and shared area 148 of data management unit 142 (sequence SQ50).
 このように、モーション処理部132の処理の実行は、予め定められた参照変数設定162に従って、アプリケーションプログラム160の実行において参照される対象となる値を共有領域148に格納する処理を含む。共有領域148に格納された値は、アプリケーションプログラム160の実行において参照可能になっている。 In this way, the execution of the process of the motion processing unit 132 includes the process of storing in the shared area 148 the values to be referenced in the execution of the application program 160 according to the predetermined reference variable settings 162 . The values stored in the shared area 148 can be referenced when the application program 160 is executed.
 続いて、アプリケーション実行処理175(図8参照)において、アプリケーションプログラム実行部134は、入力データを取得し(シーケンスSQ32)、アプリケーションプログラム160を実行する(シーケンスSQ34)。アプリケーションプログラム実行部134は、アプリケーションプログラム160の実行過程において、モーション処理部132が保持するデータの参照が必要になると、データ管理部142の共有領域148に格納されているデータを取得する(シーケンスSQ52)。このように、アプリケーションプログラム160の実行は、先に実行されたモーション処理部132の処理の実行において共有領域148に格納された値を参照する処理を含む。すなわち、アプリケーションプログラム160を実行する処理は、同一の制御周期内において、モーション処理の実行によって計算された値を参照する処理を含む。 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). When the application program execution unit 134 needs to refer to the data held by the motion processing unit 132 during the execution process of the application program 160, the application program execution unit 134 acquires the data stored in the shared area 148 of the data management unit 142 (sequence SQ52). ). Thus, execution of application program 160 includes processing that refers to values stored in shared area 148 in execution of previously executed processing of motion processor 132 . That is, the process of executing the application program 160 includes the process of referring to the values calculated by executing the motion process within the same control cycle.
 そして、アプリケーションプログラム実行部134は、アプリケーションプログラム160の実行結果をデータ管理部142のIOデータ領域144に出力データとして格納する(シーケンスSQ40)。また、アプリケーションプログラム実行部134は、アプリケーションプログラム160の実行によってコマンドの送信が必要になると、当該コマンドを対象のロボット200へ送信する(シーケンスSQ42)。 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). Further, when execution of the application program 160 requires transmission of a command, the application program execution unit 134 transmits the command to the target robot 200 (sequence SQ42).
 上述したような処理手順によって、アプリケーションプログラム実行部134は、同じ制御周期においてモーション処理部132が取得および生成したデータを利用して、必要な処理およびコマンドの生成を行うことができる。すなわち、同一の制御周期T1内において、モーション処理部132の処理の実行によって計算された値を、後続のアプリケーションプログラム160の実行において参照できるようになっている。 By the processing procedure as described above, the application program execution unit 134 can use 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 executing the processing of the motion processing unit 132 can be referred to in subsequent execution of the application program 160. FIG.
 <E.設定例およびアプリケーションプログラム例>
 次に、本実施の形態に係る制御システム1の制御装置100に対する設定例および制御装置100で実行されるアプリケーションプログラム160の一例について説明する。
<E. Setting example and application program example>
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.
 図11は、本実施の形態に係るサポート装置600が提供するユーザインターフェイス画面の一例を示す模式図である。図11には、モーション処理に関するモーション設定152(図7参照)を生成するためのユーザインターフェイス画面650が示されている。 FIG. 11 is a schematic diagram showing an example of a user interface screen provided by support device 600 according to the present embodiment. FIG. 11 shows a user interface screen 650 for generating motion settings 152 (see FIG. 7) for motion processing.
 ユーザインターフェイス画面650は、対象軸(本実施例においては、サーボドライバ350が駆動するサーボモータ300)の選択を受け付けて、当該対象軸に関するパラメータの設定を受け付ける。図11には、「MC_Axis000(0)」をラベルとする軸の設定例が示されている。 The user interface screen 650 accepts the selection of the target axis (in this embodiment, the servomotor 300 driven by the servo driver 350) and accepts the setting of parameters related to the target axis. FIG. 11 shows an example of setting an axis labeled "MC_Axis000(0)".
 より具体的には、ユーザインターフェイス画面650は、対象軸(サーボモータ300)の駆動に係る速度、加速度、トルクに関する設定値を受け付ける設定受付部652と、サーボドライバ350に接続されたサーボモータ300に関する設定値を受け付ける設定受付部654とを含む。ユーザインターフェイス画面650を介して設定された設定値(パラメータ)は、モーション設定152として格納される。 More specifically, the user interface screen 650 includes a setting reception unit 652 that receives setting values related to speed, acceleration, and torque related to driving the target axis (servo motor 300), and a setting related to the servo motor 300 connected to the servo driver 350. and a setting reception unit 654 that receives setting values. Setting values (parameters) set via the user interface screen 650 are stored as motion settings 152 .
 図12は、本実施の形態に係るサポート装置600が提供するユーザインターフェイス画面の別の一例を示す模式図である。図12には、アプリケーションプログラム160の実行時に参照可能な変数を定義する参照変数設定162(図7参照)を生成するためのユーザインターフェイス画面660が示されている。 FIG. 12 is a schematic diagram showing another example of the 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 settings 162 (see FIG. 7) that define variables that can be referenced when the application program 160 is executed.
 ユーザインターフェイス画面660は、対象軸(本実施例においては、サーボドライバ350が駆動するサーボモータ300)の選択を受け付けて、当該対象軸に関するパラメータの設定を受け付ける。 The user interface screen 660 accepts selection of a target axis (in this embodiment, the servomotor 300 driven by the servo driver 350) and accepts parameter settings related to the target axis.
 より具体的には、ユーザインターフェイス画面660は、アプリケーションプログラム160側で対象軸あるいは変数を特定するための対象特定表示欄663として、「Using_EndoderID」が示されている。ユーザは、目的とする「Using_EndoderID」に対応付けて、対象軸を特定するための情報を設定する(軸設定欄664)。図12に示す例では、「Using_EndoderID」が「101」の第1エントリ661に「MC_Axis000(0)」が対応付けられており、「Using_EndoderID」が「102」の第2エントリ662に「MC_Axis000(0)」が対応付けられている。 More specifically, the user interface screen 660 shows "Using_EndenderID" as an object identification display field 663 for identifying an object axis or variable on the application program 160 side. The user sets information for identifying the target axis in association with the desired "Using_EnderID" (axis setting column 664). In the example shown in FIG. 12 , “MC_Axis000(0)” is associated with the first entry 661 whose “Using_EnderID” is “101”, and “MC_Axis000(0)” is associated with the second entry 662 whose “Using_EnderID” is “102”. )” is associated.
 なお、ユーザインターフェイス画面660は、対象軸に関連付けられる複数の値のうち、いずれの値を使用するのかを設定できるようになっている。すなわち、ユーザインターフェイス画面660は、データ種別選択欄665を有している。対象軸の現在値、すなわちフィードバック値を選択する場合には、「Actual Position」が選択される。また、対象軸に対する指令値を選択する場合には、「Command Position」が選択される。図12に示す例では、第1エントリ661には、「MC_Axis000(0)」の現在値(フィールドバック値)が割り当てられており、第2エントリ662には、「MC_Axis000(0)」の指令値が割り当てられている。 It should be noted that the user interface screen 660 allows setting of which value to use among a plurality of values associated with the target axis. That is, the user interface screen 660 has a data type selection field 665 . When selecting the current value of the target axis, that is, the feedback value, "Actual Position" is selected. Also, when selecting the command value for the target axis, "Command Position" is selected. In the example shown in FIG. 12, the first entry 661 is assigned the current value (fieldback value) of "MC_Axis000(0)", and the second entry 662 is assigned the command value of "MC_Axis000(0)". is assigned.
 このように、参照変数設定162は、モーション処理に関して定義された変数と、アプリケーションプログラム160において定義された変数とを対応付ける情報を含むことになる。 In this way, the reference variable setting 162 includes information that associates variables defined for motion processing with variables defined in the application program 160 .
 さらに、ユーザインターフェイス画面660は、各エントリの値を更新する条件を設定する更新条件設定欄666を有している。 Furthermore, the user interface screen 660 has an update condition setting field 666 for setting conditions for updating the value of each entry.
 更新条件設定欄666には、後述するような手順によって設定されるラッチ信号の番号が設定可能になっている。更新条件設定欄666に何らかの番号も設定されていなければ、制御周期毎に値が更新されることになる。 In the update condition setting column 666, it is possible to set the number of the latch signal set by the procedure described later. If no number is set in the update condition setting field 666, the value will be updated every control cycle.
 一方、更新条件設定欄666に番号が設定されていなければ、設定された番号の信号が変化する(FALSEからTRUE、あるいは、TRUEからFALSE)と、対応する値が更新されることになる。更新条件設定欄666に設定される番号が正であれば、信号の立ち上がり(FALSEからTRUE)が値更新の条件となり、更新条件設定欄666に設定される番号が負であれば、信号の立ち上がり(TRUEからFALSE)が値更新の条件となる。 On the other hand, if no number is set in the update condition setting column 666, the corresponding value will be updated when the signal of the set number changes (FALSE to TRUE or 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) is the condition for updating the value, and if the number set in the updating condition setting field 666 is negative, the rising edge of the signal. (TRUE to FALSE) is the condition for updating the value.
 図13は、本実施の形態に係るサポート装置600が提供するユーザインターフェイス画面のさらに別の一例を示す模式図である。図13には、図12に示すユーザインターフェイス画面660の更新条件設定欄666に設定可能な番号を定義するためのユーザインターフェイス画面670が示されている。 FIG. 13 is a schematic diagram showing still another example of the user interface screen provided by the support device 600 according to the present embodiment. FIG. 13 shows a user interface screen 670 for defining numbers that can be set in the update condition setting field 666 of the user interface screen 660 shown in FIG.
 ユーザインターフェイス画面670は、ラッチ信号となる入出力信号を取得するデバイスを設定するソースデバイス設定欄673と、設定されたデバイスがもつデータのうち対象とするデータの位置を設定するポート設定欄674と、割り当てられる番号を設定する番号設定欄675とを含む。 The user interface screen 670 includes a source device setting field 673 for setting a device for acquiring an input/output signal that becomes a latch signal, and a port setting field 674 for setting the position of target data among the data held by the set device. , and a number setting field 675 for setting the assigned number.
 図13に示す例では、番号として「4001」が第1エントリ671に対応付けられており、番号として「4002」が第2エントリ672に対応付けられている。なお、ユーザインターフェイス画面670において設定したラッチ番号は、アプリケーションプログラム160においても参照することができる。 In the example shown in FIG. 13, "4001" is associated with the first entry 671 as the number, and "4002" is associated with the second entry 672 as the number. Note that the latch number set on the user interface screen 670 can also be referred to by the application program 160 .
 図12および図13に示すユーザインターフェイス画面において設定された内容は、参照変数設定162として格納される。 The contents set on the user interface screens shown in FIGS. 12 and 13 are stored as reference variable settings 162 .
 図14は、本実施の形態に係る制御装置100が実行するアプリケーションプログラム160の一例を示す模式図である。図14には、一例として、制御装置100からカメラ400に対して撮像トリガが与えられると、ロボット200をコンベア30に追従させて移動させるプログラム例が示されている。図14には、一例として、V+言語で記述されたロボットプログラムのコードを示す。V+言語においては、各命令は「キーワード」と称される。以下では、「命令」の一例として「キーワード」を用いる場合について説明するが、「キーワード」に限られず、言語体系に応じた任意の命令を用いることができる。 FIG. 14 is a schematic diagram showing an example of an application program 160 executed by the control device 100 according to this embodiment. FIG. 14 shows, as an example, a program example in which the robot 200 is caused to move following the conveyor 30 when an imaging trigger is given from the control device 100 to the camera 400 . FIG. 14 shows the code of the robot program written in V+ language as an example. In the V+ language, each instruction is called a "keyword". In the following, a case where "keyword" is used as an example of "instruction" will be described.
 図14を参照して、アプリケーションプログラム160は、初期設定として、対象となる軸を特定するための対象軸設定のコード1601を含む。図14に示す例では、「Using_EndoderID」が「101」である軸がオブジェクト「belt」の「num」プロパティに設定されている。アプリケーションプログラム160は、初期設定として、対象軸が有しているラッチ信号を初期化するためのコード1602を含む。 Referring to FIG. 14, the application program 160 includes, as an initial setting, a target axis setting code 1601 for specifying the target axis. In the example shown in FIG. 14, the axis whose "Using_EnderID" is "101" is set to the "num" property of the object "belt". The application program 160 includes code 1602 for initializing the latch signal of the target axis as initialization.
 アプリケーションプログラム160のコード1603は、ロボット200の初期位置まで移動させるための命令である。アプリケーションプログラム160のコード1604は、各種設定を行うための命令である。 A code 1603 of the application program 160 is an instruction for moving the robot 200 to its initial position. A code 1604 of the application program 160 is an instruction for making various settings.
 アプリケーションプログラム160のコード1605は、所定条件が満たされると、実行される命令を規定する。実行される命令は、「4001」のラッチ番号が付与された信号が検出される(立ち上がりまたは立ち上がりが生じる)まで待機するためのコード1606と、信号が検出されると、対象軸の現在値の値を取得するためのコード1607と、対象軸の現在値を基準としてロボット200に所定の動作を行わせるためのコード1608とを含む。すなわち、コード1607において、「%belt」との変数1609に対象軸の現在値がセットされ、コード1608において、変数1609(変数%belt)を基準とした移動などのコマンドがロボット200に送信される。 The code 1605 of the application program 160 defines instructions to be executed when predetermined conditions are met. The instruction to be executed consists of a code 1606 for waiting until a signal with a latch number of "4001" is detected (a rising edge or a rising edge occurs), and a current value of the target axis when the signal is detected. It includes code 1607 for acquiring a value 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 in the variable 1609 of "%belt", and in code 1608, a command such as movement based on the variable 1609 (variable %belt) is sent to the robot 200. .
 以上のように、本実施の形態に係る制御装置100においては、IECプログラム150の実行時に、モーション処理部132が管理するモーション軸に関する情報を遅延なく参照できるので、制御性能をより高めることができる。 As described above, in the control device 100 according to the present embodiment, the information about the motion axis managed by the motion processing unit 132 can be referred without delay when the IEC program 150 is executed, so that the control performance can be further improved. .
 <F.現在値補正>
 図12に示すように、ラッチ信号の条件が成立した場合に、対象軸から現在値が取得される。このとき、ラッチ信号の条件が成立したタイミングと、対象軸から現在値を取得したタイミングとの間に時間的なずれがある場合には、当該時間的なずれを補正するような処理を行ってもよい。
<F. Current value correction>
As shown in FIG. 12, the current value is obtained from the target axis when the condition of the latch signal is satisfied. At this time, if there is a time lag between the timing when the condition of the latch signal is met and the timing when the current value is acquired from the target axis, processing is performed to correct the time lag. good too.
 具体的には、ラッチ信号の条件が成立したタイミング(時刻t1)と、対象軸から現在値を取得したタイミング(時刻t2)とを用いて、時刻t1におけるフィードバック位置は、(時刻t2で取得した現在値)+対象軸の移動速度(フィールドバック速度)×(t1-t2)と算出できる。 Specifically, using the timing (time t1) at which the condition of the latch signal is satisfied and the timing (time t2) at which the current value is acquired from the target axis, the feedback position at time t1 is current value) + movement speed of target axis (feedback speed) x (t1-t2).
 このような現在値の補正処理は、制御装置100のシステムプログラム111で実行するようにしてもよい。 Such current value correction processing may be executed by the system program 111 of the control device 100 .
 <G.付記>
 上述したような本実施の形態は、以下のような技術思想を含む。
<G. Note>
The present embodiment as described above includes the following technical ideas.
 [構成1]
 制御対象を制御するための制御装置(100)であって、
 シーケンス命令を含む第1ユーザプログラム(150)を実行する第1プログラム実行部(130)と、
 モーション処理部(132)と、
 ロボット(200)を制御するための第2ユーザプログラム(160)を実行する第2プログラム実行部(134)とを備え、
 前記第1ユーザプログラムの実行(173)、前記モーション処理部の処理の実行(174)、前記第2ユーザプログラムの実行(175)の順番で、予め定められた制御周期(T1)毎に繰り返されるように構成されており、
 同一の制御周期内において、前記モーション処理部の処理の実行によって計算された値を、後続の前記第2ユーザプログラムの実行において参照できるように構成されている、制御装置。
[Configuration 1]
A control device (100) for controlling a controlled object,
a first program execution unit (130) for executing a first user program (150) containing sequence instructions;
a motion processing unit (132);
a second program execution unit (134) that executes a second user program (160) for controlling the robot (200);
Execution of the first user program (173), execution of the process of the motion processing unit (174), and execution of the second user program (175) are repeated in the order of a predetermined control cycle (T1). is configured as
A control device configured to refer to a value calculated by executing the processing of the motion processing unit within the same control cycle in subsequent execution of the second user program.
 [構成2]
 前記モーション処理部の処理の実行は、予め定められた設定(162)に従って、前記第2ユーザプログラムの実行において参照される対象となる値を保持する処理(SQ14,SQ28)を含む、構成1に記載の制御装置。
[Configuration 2]
Execution of processing by the motion processing unit includes processing (SQ14, SQ28) for holding values to be referred to in execution of the second user program according to a predetermined setting (162). Control device as described.
 [構成3]
 前記第2ユーザプログラムの実行は、先に実行された前記モーション処理部の処理の実行において保持された値を参照する処理(SQ36,SQ38)を含む、構成2に記載の制御装置。
[Configuration 3]
3. The control device according to configuration 2, wherein the execution of the second user program includes processing (SQ36, SQ38) of referring to values held in previously executed processing of the motion processing unit.
 [構成4]
 前記モーション処理部の処理の実行は、予め定められた設定(162)に従って、前記第2ユーザプログラムの実行において参照される対象となる値を共有領域に格納する処理(SQ48)を含む、構成1に記載の制御装置。
[Configuration 4]
Configuration 1, wherein the execution of the processing of the motion processing unit includes processing (SQ48) of storing a value to be referred to in execution of the second user program in a shared area according to a predetermined setting (162) The control device according to .
 [構成5]
 前記第2ユーザプログラムの実行は、先に実行された前記モーション処理部の処理の実行において前記共有領域に格納された値を参照する処理(SQ52)を含む、構成4に記載の制御装置。
[Configuration 5]
The control device according to configuration 4, wherein the execution of the second user program includes a process (SQ52) of referring to the value stored in the shared area in the previously executed process of the motion processing unit.
 [構成6]
 前記予め定められた設定は、前記モーション処理部の処理に関して定義された変数と、前記第2ユーザプログラムにおいて定義された変数とを対応付ける情報(162;660)を含む、構成2~5のいずれか1項に記載の制御装置。
[Configuration 6]
Any one of configurations 2 to 5, wherein the predetermined setting includes information (162; 660) that associates variables defined for processing of the motion processing unit with variables defined in the second user program. 2. The control device according to item 1.
 [構成7]
 前記モーション処理部の処理の実行は、対象のデバイスに対する指令値を計算する処理とを含む、構成1~6のいずれか1項に記載の制御装置。
[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.
 [構成8]
 前記第1ユーザプログラムの実行前に、対象のデバイスから現在値を取得する処理(171)が実行される、構成1~7のいずれか1項に記載の制御装置。
[Configuration 8]
8. The control device according to any one of the configurations 1 to 7, wherein a process (171) of obtaining a current value from a target device is executed before executing the first user program.
 [構成9]
 制御対象を制御するための制御装置(100)におけるプログラム実行方法であって、
 予め定められた制御周期(T1)毎に、
  シーケンス命令を含む第1ユーザプログラム(150)を実行するステップ(173)と、
  前記第1ユーザプログラムの実行に続いて、モーション処理を実行するステップ(174)と、
  前記モーション処理の実行に続いて、第2ユーザプログラム(160)を実行するステップとを繰り返すステップ(175)を備え、
 前記第2ユーザプログラムを実行するステップは、同一の制御周期内において、前記モーション処理の実行によって計算された値を参照するステップを含む、プログラム実行方法。
[Configuration 9]
A program execution method in a control device (100) for controlling a controlled object,
For each predetermined control cycle (T1),
executing (173) a first user program (150) comprising sequence instructions;
following execution of the first user program, executing (174) motion processing;
repeating (175) the step of executing a second user program (160) following execution of said motion processing;
The program execution method, wherein the step of executing the second user program includes a step of referring to values calculated by executing the motion processing within the same control period.
 [構成10]
 制御対象を制御するための制御装置(100)に向けられたプログラム(111)であって、前記制御装置に、
 予め定められた制御周期(T1)毎に、
  シーケンス命令を含む第1ユーザプログラムを実行するステップ(173)と、
  前記第1ユーザプログラムの実行に続いて、モーション処理を実行するステップ(174)と、
  前記モーション処理の実行に続いて、第2ユーザプログラムを実行するステップとを繰り返すステップ(175)を実行させ、
 前記第2ユーザプログラムを実行するステップは、同一の制御周期内において、前記モーション処理の実行によって計算された値を参照するステップを含む、プログラム。
[Configuration 10]
A program (111) directed to a control device (100) for controlling a controlled object, the control device comprising:
For each predetermined control cycle (T1),
executing (173) a first user program comprising sequence instructions;
following execution of the first user program, executing (174) motion processing;
executing a step (175) of repeating the step of executing a second user program following execution of the motion processing;
A program according to claim 1, wherein the step of executing the second user program includes a step of referring to values calculated by executing the motion processing within the same control cycle.
 <H.利点>
 本実施の形態に係る制御装置100によれば、同一の制御周期T1内において、モーション処理の実行によって計算された値を、後続のアプリケーションプログラム160の実行において参照できるようになっている。そのため、モーション処理に関連する特定の軸(デバイス)に関する値(指令値およびフィードバック値(現在値))を参照して、ロボット200を制御する場合に、データ更新の時間的ずれや揺らぎを低減できる。これによって、モーション処理とロボット制御とを連携したより高精度な制御を実現できる。
<H. Advantage>
According to the control device 100 of the present embodiment, the values calculated by executing the motion processing within the same control period T1 can be referred to in subsequent execution of the application program 160. FIG. Therefore, when controlling the robot 200 by referring to the values (command value and feedback value (current value)) related to a specific axis (device) related to motion processing, it is possible to reduce time lag and fluctuations in data update. . As a result, it is possible to realize more precise control by linking motion processing and robot control.
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiments disclosed this time should be considered illustrative in all respects and not restrictive. The scope of the present invention is indicated by the scope of the claims rather than the above description, and is intended to include all modifications within the scope and meaning equivalent to the scope of the claims.
 1 制御システム、2 ワーク、10 フィールドネットワーク、20 上位ネットワーク、30 コンベア、50,60,70 実行期間、100 制御装置、102,262,362,602 プロセッサ、104,264,364,604 メインメモリ、106 上位ネットワークコントローラ、108,252,352 フィールドネットワークコントローラ、110,266,366,610 ストレージ、111,268,368 システムプログラム、112 メモリカードインターフェイス、114 メモリカード、116 ローカルバスコントローラ、118 プロセッサバス、120,618 USBコントローラ、122 ローカルバス、124 機能ユニット、130 IECプログラム実行部、132 モーション処理部、134 アプリケーションプログラム実行部、136 インタプリタ、138 キャッシュ、140 コマンド送信部、142 データ管理部、144 IOデータ領域、146 内部データ領域、148 共有領域、150 IECプログラム、152 モーション設定、160 アプリケーションプログラム、162 参照変数設定、170 入出力リフレッシュ処理、171 モーション入力処理、172 アプリケーション入力処理、173 IECプログラム実行処理、174 モーション実行処理、175 アプリケーション実行処理、200 ロボット、250 ロボットコントローラ、260,360 制御処理回路、270 インターフェイス回路、300 サーボモータ、310 エンコーダ、350 サーボドライバ、370 ドライブ回路、372 カウンタ回路、400 カメラ、450 画像処理装置、500 リモートIO装置、600 サポート装置、606 入力部、608 表示部、612 OS、614 開発プログラム、616 ネットワークコントローラ、620 光学ドライブ、622 記録媒体、624 バス、650,660,670 ユーザインターフェイス画面、652,654 設定受付部、661,671 第1エントリ、662,672 第2エントリ、663 対象特定表示欄、664 軸設定欄、665 データ種別選択欄、666 更新条件設定欄、673 ソースデバイス設定欄、674 ポート設定欄、675 番号設定欄、700 表示装置、800 サーバ装置、1601,1602,1603,1604,1605,1606,1607,1608 コード、1609 変数、T1 制御周期。 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 input/output refresh processing, 171 motion input processing, 172 application input processing, 173 IEC program execution processing, 174 motion Execution process, 175 Application execution process, 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 unit, 608 display unit, 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 identification 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, 1 603, 1604, 1605, 1606, 1607, 1608 codes, 1609 variables, T1 control cycle.

Claims (10)

  1.  制御対象を制御するための制御装置であって、
     シーケンス命令を含む第1ユーザプログラムを実行する第1プログラム実行部と、
     モーション処理部と、
     ロボットを制御するための第2ユーザプログラムを実行する第2プログラム実行部とを備え、
     前記第1ユーザプログラムの実行、前記モーション処理部の処理の実行、前記第2ユーザプログラムの実行の順番で、予め定められた制御周期毎に繰り返されるように構成されており、
     同一の制御周期内において、前記モーション処理部の処理の実行によって計算された値を、後続の前記第2ユーザプログラムの実行において参照できるように構成されている、制御装置。
    A control device for controlling a controlled object,
    a first program execution unit that executes a first user program including sequence instructions;
    a motion processing unit;
    a second program execution unit that executes a second user program for controlling the robot;
    The order of execution of the first user program, execution of the processing of the motion processing unit, and execution of the second user program is configured to be repeated at a predetermined control cycle,
    A control device configured to refer to a value calculated by executing the processing of the motion processing unit within the same control cycle in subsequent execution of the second user program.
  2.  前記モーション処理部の処理の実行は、予め定められた設定に従って、前記第2ユーザプログラムの実行において参照される対象となる値を保持する処理を含む、請求項1に記載の制御装置。 The control device according to claim 1, wherein the execution of the process by the motion processing unit includes a process of holding a value to be referenced in execution of the second user program according to a predetermined setting.
  3.  前記第2ユーザプログラムの実行は、先に実行された前記モーション処理部の処理の実行において保持された値を参照する処理を含む、請求項2に記載の制御装置。 3. The control device according to claim 2, wherein the execution of the second user program includes a process of referring to the value held in the previously executed process of the motion processing unit.
  4.  前記モーション処理部の処理の実行は、予め定められた設定に従って、前記第2ユーザプログラムの実行において参照される対象となる値を共有領域に格納する処理を含む、請求項1に記載の制御装置。 2. The control device according to claim 1, wherein the execution of processing by said motion processing unit includes processing for storing, in a shared area, a value to be referenced in execution of said second user program according to a predetermined setting. .
  5.  前記第2ユーザプログラムの実行は、先に実行された前記モーション処理部の処理の実行において前記共有領域に格納された値を参照する処理を含む、請求項4に記載の制御装置。 5. The control device according to claim 4, wherein the execution of the second user program includes a process of referring to the value stored in the shared area in the previously executed process of the motion processing unit.
  6.  前記予め定められた設定は、前記モーション処理部の処理に関して定義された変数と、前記第2ユーザプログラムにおいて定義された変数とを対応付ける情報を含む、請求項2~5のいずれか1項に記載の制御装置。 6. The predetermined setting according to any one of claims 2 to 5, wherein the predetermined setting includes information associating variables defined for processing of the motion processing unit with variables defined in the second user program. controller.
  7.  前記モーション処理部の処理は、対象のデバイスに対する指令値を計算する処理とを含む、請求項1~6のいずれか1項に記載の制御装置。 The control device according to any one of claims 1 to 6, wherein the processing of said motion processing unit includes processing of calculating a command value for a target device.
  8.  前記第1ユーザプログラムの実行前に、対象のデバイスから現在値を取得する処理が実行される、請求項1~7のいずれか1項に記載の制御装置。 The control device according to any one of claims 1 to 7, wherein a process of acquiring a current value from a target device is executed before executing the first user program.
  9.  制御対象を制御するための制御装置におけるプログラム実行方法であって、
     予め定められた制御周期毎に、
      シーケンス命令を含む第1ユーザプログラムを実行するステップと、
      前記第1ユーザプログラムの実行に続いて、モーション処理を実行するステップと、
      前記モーション処理の実行に続いて、第2ユーザプログラムを実行するステップとを繰り返すステップを備え、
     前記第2ユーザプログラムを実行するステップは、同一の制御周期内において、前記モーション処理の実行によって計算された値を参照するステップを含む、プログラム実行方法。
    A program execution method in a control device for controlling a controlled object,
    For each predetermined control cycle,
    executing a first user program comprising sequence instructions;
    executing motion processing subsequent to execution of the first user program;
    repeating the step of executing a second user program following execution of the motion processing;
    The program execution method, wherein the step of executing the second user program includes a step of referring to values calculated by executing the motion processing within the same control period.
  10.  制御対象を制御するための制御装置に向けられたプログラムであって、前記制御装置に、
     予め定められた制御周期毎に、
      シーケンス命令を含む第1ユーザプログラムを実行するステップと、
      前記第1ユーザプログラムの実行に続いて、モーション処理を実行するステップと、
      前記モーション処理の実行に続いて、第2ユーザプログラムを実行するステップとを繰り返すステップを実行させ、
     前記第2ユーザプログラムを実行するステップは、同一の制御周期内において、前記モーション処理の実行によって計算された値を参照するステップを含む、プログラム。
    A program directed to a control device for controlling a controlled object, the control device comprising:
    For each predetermined control cycle,
    executing a first user program comprising sequence instructions;
    executing motion processing subsequent to execution of the first user program;
    executing a step of executing a second user program following execution of the motion processing;
    A program according to claim 1, wherein the step of executing the second user program includes a step of referring to values calculated by executing the motion processing within the same control cycle.
PCT/JP2021/009576 2021-01-27 2021-03-10 Control device, program execution method, and program WO2022162958A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-011174 2021-01-27
JP2021011174A JP2022114752A (en) 2021-01-27 2021-01-27 Control device, program execution method, and program

Publications (1)

Publication Number Publication Date
WO2022162958A1 true WO2022162958A1 (en) 2022-08-04

Family

ID=82653088

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/009576 WO2022162958A1 (en) 2021-01-27 2021-03-10 Control device, program execution method, and program

Country Status (2)

Country Link
JP (1) JP2022114752A (en)
WO (1) WO2022162958A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019036043A (en) * 2017-08-10 2019-03-07 オムロン株式会社 Control device
JP2019049947A (en) * 2017-09-12 2019-03-28 オムロン株式会社 Controller and control method
JP2019067046A (en) * 2017-09-29 2019-04-25 オムロン株式会社 Control system and control unit
JP2021002113A (en) * 2019-06-20 2021-01-07 オムロン株式会社 Control device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019036043A (en) * 2017-08-10 2019-03-07 オムロン株式会社 Control device
JP2019049947A (en) * 2017-09-12 2019-03-28 オムロン株式会社 Controller and control method
JP2019067046A (en) * 2017-09-29 2019-04-25 オムロン株式会社 Control system and control unit
JP2021002113A (en) * 2019-06-20 2021-01-07 オムロン株式会社 Control device

Also Published As

Publication number Publication date
JP2022114752A (en) 2022-08-08

Similar Documents

Publication Publication Date Title
US10496079B2 (en) Control device and control method
US10761515B2 (en) Control system for controlling control object and control device for linking control applications in control system
US10678218B2 (en) Control device
US20190095247A1 (en) Control device
US10908577B2 (en) Control device
US10606246B2 (en) Control device and control method with various command values in a shared memory providing access to various program execution and command value operation parts in each control cycle
US20190095246A1 (en) Support device and non-transitory storage medium
WO2021106467A1 (en) Control system, control device, and control method
WO2021181799A1 (en) Robot control system and control method
US20230101517A1 (en) Robot control system and control method
WO2022162958A1 (en) Control device, program execution method, and program
CN111176225B (en) Method and apparatus for proxy execution and calculation using industrial controller
EP3457239A1 (en) Control device and control method
US20180284722A1 (en) Information processing device, information processing method, and recording medium
US20220397880A1 (en) Control device
WO2022162959A1 (en) Control system, robot controller, and control method
JP7375632B2 (en) Control system and support equipment
WO2021181800A1 (en) Robot control system and control method
WO2022168336A1 (en) Control device, control method, and control program
WO2021145124A1 (en) Control device
Kelkar EtherCAT based motion controller
JP2021144586A (en) Robot control system and control method
JP2021114019A (en) Data processing method

Legal Events

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

Ref document number: 21922967

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21922967

Country of ref document: EP

Kind code of ref document: A1