[go: up one dir, main page]

WO2020026622A1 - 制御装置 - Google Patents

制御装置 Download PDF

Info

Publication number
WO2020026622A1
WO2020026622A1 PCT/JP2019/024145 JP2019024145W WO2020026622A1 WO 2020026622 A1 WO2020026622 A1 WO 2020026622A1 JP 2019024145 W JP2019024145 W JP 2019024145W WO 2020026622 A1 WO2020026622 A1 WO 2020026622A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
editing
control
unit
application
Prior art date
Application number
PCT/JP2019/024145
Other languages
English (en)
French (fr)
Inventor
純児 島村
佳代子 磯谷
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2020026622A1 publication Critical patent/WO2020026622A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • 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
    • G05B19/4093Numerical 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 characterised by part programming, e.g. entry of geometrical information as taken from a technical drawing, combining this with machining and material information to obtain control information, named part programme, for the NC machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Definitions

  • the present invention relates to a control device that executes control of a control target.
  • a ladder program for determining how to use a plurality of control applications such as a machine tool and a robot used in a manufacturing site in cooperation with each other and realizing the use is provided by a machine tool maker.
  • These ladder programs cannot be edited by the user, and when the user wants to add a function, it is necessary to request a machine tool maker to remodel the ladder program.
  • the programs are independent for each control application, and when the control applications perform cooperative operations, it is necessary to understand what operation each control application uses from each program.
  • a technology is provided so that a user can determine a cooperative operation between control applications by a machining program (for example, see Patent Document 1).
  • a user can input a machining program including a machine tool command and a robot command to a control device that controls the machine tool and the robot.
  • the control device transfers the machine tool command sentence included in the machining program to the machine tool control means, and transfers the robot command sentence to the robot control means.
  • a ladder program for linking the machine tool and the robot is not required, and the machine tool and the robot can be linked by a user-defined machining program.
  • One embodiment of the present invention has been made in view of the above-described circumstances, and has an object to realize a technique that can collectively create a PLC program and one or a plurality of application programs called from the PLC program.
  • a control device includes a first program that is entirely scanned each time an execution is performed, and a second program that is called and sequentially executed from the first program, An editing unit that provides a development tool that can be edited in one development environment in parallel; a program management unit that builds the first program and the second program collectively; A first execution unit that generates a command for controlling the first drive device in each control cycle by executing a program; and a second drive unit that sequentially executes a plurality of command statements included in the second program. And a second execution unit that sequentially generates a command for controlling the apparatus.
  • a PLC program and one or a plurality of application programs called from the PLC program can be created together.
  • FIG. 2 is a diagram illustrating an outline of a system environment in which the integrated controller according to the first embodiment of the present invention is used.
  • FIG. 3 is a block diagram illustrating a main configuration of the integrated controller.
  • FIG. 3 is a schematic diagram illustrating an example of a functional configuration of an integrated controller. It is a figure showing an example of an edit window. It is a figure showing the modification of an edit window. It is a figure showing the modification of an edit window.
  • 9 is a flowchart illustrating a flow of a process of the integrated controller. 5 is a timing chart of processing execution of the integrated controller.
  • FIG. 7 is a diagram illustrating a display example during execution of an application program.
  • FIG. 3 is a schematic diagram conceptually showing an intermediate code.
  • FIG. 9 is a schematic diagram for describing an example of generating an intermediate code. It is a block diagram which shows the principal part structure of the integrated controller of a modification.
  • FIG. 1 is a diagram illustrating an outline of a system environment in which an integrated controller 100 which is an example of a control device according to the present embodiment is used.
  • the integrated controller 100 is connected to a control target such as the robot 520 and the machine tool 530 via the motion network cable 2. Further, the integrated controller 100 is connected to the server device 300 via the network 6 such as Ethernet (registered trademark).
  • the integrated controller 100 is a device that comprehensively controls a control target such as the robot 520 and the machine tool 530.
  • the integrated controller 100 also functions as a PLC (Programmable Logic Controller) that controls a servo driver 540 that drives a servo motor 542 of the belt conveyor 544 according to various sensor inputs.
  • PLC Programmable Logic Controller
  • the integrated controller 100 is an apparatus in which a PLC program and an application program for controlling each of control applications such as the robot 520 and the machine tool 530 are integrally mounted.
  • the integrated controller 100 executes a program corresponding to the control target, and controls these control targets, thereby synchronously controlling the production line and each control application.
  • the PLC program is a program described in a ladder language, and is entirely scanned every time it is executed.
  • the PLC program is described, for example, according to the international standard IEC61131-3 defined by the International Electrotechnical Commission (IEC).
  • a robot program for controlling the robot 520 is generally described in a systematic so-called robot language.
  • the NC program for controlling the machine tool 530 is generally described by G-code standardized by ISO.
  • the integrated controller 100 provides a user with a development tool that enables a PLC program and an application program to be edited in one development environment. Further, the integrated controller 100 builds and manages the PLC program and the application program collectively.
  • the integrated controller 100 provides the user with a development tool that controls the production line and each control application synchronously, and enables a program corresponding to each control target to be edited in one development environment. Thereby, the user can collectively create the PLC program and the application program of the control application such as the robot 520 and the machine tool 530 which is called from the PLC program.
  • FIG. 1 is a diagram illustrating an outline of a system environment in which the integrated controller 100 is used.
  • FIG. 2 is a block diagram illustrating a main configuration of the integrated controller 100.
  • FIG. 3 is a schematic diagram illustrating an example of a functional configuration of the integrated controller 100.
  • the integrated controller 100 is an industrial controller and controls a device to be controlled.
  • the integrated controller 100 is connected to one or more field devices 500 via the motion network cable 2, and exchanges data with the field devices 500.
  • the integrated controller 100 includes the touch panel 146.
  • the touch panel 146 functions as an input unit that receives a user operation on the integrated controller 100 and also functions as a display unit that displays a calculation result by the integrated controller 100.
  • the motion network cable 2 employs a bus or a network that performs fixed-cycle communication and guarantees data arrival time.
  • EtherCAT registered trademark
  • EtherNet / IP registered trademark
  • DeviceNet registered trademark
  • CompoNet registered trademark
  • the field device 500 is a remote I / O (Input / Output) device 510, a robot 520, a robot controller 522, a machine tool 530, a servo driver 540, a servo motor 542, and the like used in a production line or the like.
  • Each of the field devices 500 operates, for example, as follows in response to a command generated by the integrated controller 100.
  • the servomotor 542 drives the conveyor 544 to transport the work W to the work table 546 arranged in front of the NC machine tool 530.
  • the robot 520 arranges the unprocessed work W on the work table 546 in the NC machine tool 530, takes out the processed work W on the NC machine tool 530, and arranges the work W on the work table 546.
  • the integrated controller 100 exchanges data with the field device 500 in a very short cycle on the order of several hundred ⁇ sec to several tens msec, and transmits data such as a control command to the field device 500.
  • the integrated controller 100 is connected to the server device 300 and one or more display devices 400 via the network 6.
  • the network 6 may employ a general network protocol such as Ethernet (registered trademark) or EtherNet / IP (registered trademark).
  • the server device 300 is a database system, a manufacturing execution system (MES: Manufacturing Execution System), or the like.
  • the server device 300 may have a function of acquiring information from each of the field devices 500 and monitoring and managing the entire production, and may also handle order information, quality information, shipping information, and the like.
  • the display device 400 displays contents corresponding to a user operation on the integrated controller 100.
  • the display device 400 graphically displays a calculation result or the like by the integrated controller 100.
  • FIG. 2 is a block diagram illustrating a hardware configuration example of the integrated controller 100.
  • the integrated controller 100 includes a processor 102, a chipset 104, a main memory 106, and a storage 108. Further, the integrated controller 100 includes an upper network controller 110, a memory card interface 114, an internal bus controller 120, and a field network controller 130. Further, the integrated controller 100 includes a touch panel 146.
  • the processor 102 is an arithmetic processing unit called a CPU unit, and includes a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a GPU (Graphics Processing Unit), etc., although not shown.
  • a configuration having a plurality of cores may be adopted, or a plurality of processors 102 may be arranged. That is, the integrated controller 100 has one or more processors 102 and / or a processor 102 having one or more cores.
  • the processor 102 reads out various programs stored in the storage 108, expands the programs in the main memory 106, and executes the programs to implement control according to a control target and various processes described below.
  • the chipset 104 realizes the processing of the integrated controller 100 as a whole by controlling the processor 102 and its peripheral elements.
  • the main memory 106 is constituted by a volatile storage device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory).
  • a volatile storage device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory).
  • the storage 108 is constituted by a non-volatile storage device such as a hard disk drive (HDD) or a solid state drive (SSD).
  • the storage 108 stores the system program 34 for the integrated controller 100 to realize basic functions.
  • the storage 108 stores a sequence program 30 created according to a device to be controlled by the integrated controller 100, and one or more application programs 32.
  • the sequence program 30 is a PLC program, and is executed at fixed control intervals. The entire sequence program 30 is scanned every time it is executed.
  • the integrated controller 100 performs sequence control based on the state of the target device, signals from sensors, and the like, such as controlling a driving device (servo motor) according to a sensor input.
  • the application program 32 is a program for controlling a control application such as the robot 520 and the machine tool 530, and is a robot program for controlling the robot 520 and an NC program for controlling the machine tool 530.
  • the application program 32 is called from the sequence program 30 and is sequentially executed.
  • the sequence program 30 is also called a first program
  • the application program 32 is also called a second program.
  • the upper network controller 110 controls data exchange with the server device 300, the display device 400, and the like via the upper network 6.
  • the memory card interface 114 is configured so that the memory card 116 is detachable, and is capable of writing data to the memory card 116 and reading various data from the memory card 116.
  • the internal bus controller 120 controls data exchange with the I / O unit 122 mounted on the integrated controller 100.
  • the field network controller 130 controls data exchange with a field device connected via the motion network cable 2.
  • the present invention is not limited to the configuration in which the processor 102 provides a necessary function by executing a program, and a part or all of the provided function is implemented using a dedicated hardware circuit (for example, an ASIC or an FPGA). May be.
  • the main part of the integrated controller 100 may be realized by using hardware according to a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, a plurality of OSs (Operating Systems) having different applications may be executed in parallel using virtualization technology, and a required application may be executed on each OS.
  • OSs Operating Systems
  • the touch panel 146 functions as an input / output unit of the integrated controller 100.
  • FIG. 3 is a schematic diagram illustrating an example of a functional configuration of the integrated controller 100.
  • the integrated controller 100 includes an editing unit 154, a program management unit 156, an input unit 158, and a display unit 159.
  • the integrated controller 100 includes an IEC program processing unit 150, a field network interface 180, an upper network interface 182, a first control application processing unit 161, a second control application processing unit 162,.
  • Unit 160 a first execution unit
  • the control application processing unit 160 is also called a second execution unit.
  • the editing unit 154 provides a development tool that can create or edit the sequence program 30 and the application program 32 executed by the integrated controller 100 in one development environment in parallel.
  • the sequence program 30 and the application program 32 created or edited by the editing unit 154 are stored in the storage 108.
  • the editing unit 154 may provide a setting environment for setting parameters (configuration) of various devices connected to the integrated controller 100.
  • the program management unit 156 builds the sequence program 30 created or edited by the editing unit 154 and the application program 32 by compiling and linking them together.
  • the program management unit 156 converts the sequence program 30 into an executable form and converts the application program 32 into a plurality of intermediate codes by building the sequence program 30 and the application program 32 collectively. As described above, the program management unit 156 builds the sequence program 30 and the application program 32 collectively, and converts the application program 32 into an intermediate code before execution.
  • the program management unit 156 stores the built sequence program 30, application program 32, and intermediate code in the storage 108.
  • the intermediate code is a concept including an instruction for calculating a command value for each control cycle, and includes one or more instructions or one or more functions.
  • the input unit 158 receives an input of a user operation.
  • the display unit 159 displays a screen corresponding to a user operation on the input unit 158.
  • the touch panel 146 shown in FIG. 1 also functions as the input unit 158 and the display unit 159.
  • the user can edit the sequence program 30 and the application program 32 by the editing unit 154 by operating the touch panel 146.
  • the IEC program processing unit 150 executes (scans) the sequence program 30 for each predetermined control cycle, and is controlled by the PLC program for each control cycle in accordance with the motion command included in the sequence program 30.
  • One or more commands for controlling a driving device (first driving device) such as a servo driver 540 are generated and output.
  • the IEC program processing unit 150 determines whether or not each input condition (such as a sensor input value) included in the sequence program 30 is satisfied at every predetermined control cycle (for example, every 1 ⁇ sec).
  • the command output from the IEC program processing unit 150 is stored in the main memory 106.
  • the control application processing unit 160 executes a control application (second driving device) such as the robot 520 or the machine tool 530 by sequentially executing each line of a plurality of command statements included in the application program 32 called from the sequence program 30. Commands to be controlled are sequentially generated. When the input conditions included in the sequence program 30 are satisfied, the IEC program processing unit 150 calls the application program 32 corresponding to the input conditions.
  • a control application second driving device
  • the IEC program processing unit 150 calls the application program 32 corresponding to the input conditions.
  • control application processing unit 160 executes the command value calculation process in synchronization with the calculation process by the IEC program processing unit 150.
  • the control application processing unit 160 generates a command according to the intermediate code 35 stored in the storage 108 in advance, and outputs the generated command to the main memory 106.
  • the IEC program processing unit 150 can refer to the processing result of the control application processing unit 160 stored in the main memory 106.
  • the field network interface 180 includes one or a plurality of commands (basically, a logical value) generated by the IEC program processing unit 150 and one or a plurality of commands (basically, the command) generated by the control application processing unit 160. , Numerical values) to the field device 500 for each control cycle.
  • FIG. 4 is a diagram illustrating an editing window 601 provided by the editing unit 154, which is an example of a user interface of a development tool for editing the sequence program 30 and the application program 32.
  • the edit window 601 is displayed on the touch panel 146 by the function of the display unit 159, and an input corresponding to the touch position of the user is detected by the input unit 158.
  • the editing window 601 includes a first area 611 and a second area 612.
  • a program tree is displayed in the first area 611.
  • the source code of the program selected from the program tree is displayed in the second area 612.
  • a tool box 615 including a tool used for editing the program displayed in the program editing area 614 is displayed in the second area 612. The user can create or edit the sequence program 30 by introducing a tool in the tool box 615 into the program editing area 614 by drag and drop, for example.
  • the program tree displayed in the first area 611 includes the logic of the sequence program 30 (for example, the program A and the program B) and the application program 32 for controlling the second drive device such as the robot 520 and the machine tool 530 (for example, , RC1, RC2, RC_Sample, NC1, NC2, NC_Sample).
  • the sequence program 30 for example, the program A and the program B
  • the application program 32 for controlling the second drive device such as the robot 520 and the machine tool 530 (for example, , RC1, RC2, RC_Sample, NC1, NC2, NC_Sample).
  • RC1, RC2, NC1, NC2, etc. are programs created by the user. Further, among the application programs 32 included in the program tree, RC_Sample and NC_Sample are sample programs prepared in advance by the manufacturer of the integrated controller 100, for example. NC_Sample of the sample program is, for example, a source code based on a G code standardized by ISO.
  • the editing unit 154 When the user selects a sample program from the program tree in the first area 611, the editing unit 154 enables the selected sample program to be used as the editable application program 32.
  • FIG. 4 shows an example in which the user selects the program A of the PLC program in the first area 611. .. Are displayed on the tabs 613a, 613B... Respectively, and are displayed in the program editing area 614 by switching the tabs 613a, 613B. May be able to switch programs.
  • the program editing area 614 is executed when a series of logic 620 of the vertically long sequence program 30 described in the ladder language and each condition (X1, X2,%) Of the logic 620 are satisfied.
  • the programming blocks 621, 622,... In which the contents of the application program 32 are described are displayed.
  • the contents of the programming block 621 executed when the condition of X1 of the sequence program 30 is satisfied is an NC program described in G code.
  • the contents of the programming block 622 executed when the condition of X2 of the sequence program 30 is satisfied are a robot program described in a robot language.
  • the editing unit 154 enables the editing of the PLC program described in the ladder language, the NC program described in the G code, and the robot program described in the robot language in one development environment. That is, the editing unit 154 enables a plurality of programs having different control schedules, devices to be controlled, and programming languages to be edited in one development environment.
  • the user specifies an editing position in the sequence program 30 (logic) in the first area 611 or the second area 612, and selects a sample program to be used.
  • the editing unit 154 sets to call the selected sample program from the designated position in the sequence program 30.
  • the code of the selected sample program is displayed in the program editing area 614 so as to be editable.
  • a programming block 621 is provided, and the NC_Sample source code is included in the programming block 621. Be expanded.
  • the programming block 621 also functions as a sub window (including a scroll bar) in which the source code can be edited.
  • the sample program contains multiple statements.
  • a program in which a plurality of command statements of MOVEP1, MOVEP2,... Are sequentially executed is shown.
  • the user can edit a command sentence displayed in each of the blocks 621 and 622 of the program editing area 614 by using a written language.
  • the user can save the application program including the statement edited in the program editing area 614 as a new application program, or can overwrite and save an existing application program.
  • the program defined by the user and the sample program prepared in advance have high applicability, and the user can easily create the user-defined program.
  • FIGS. 5 and 6 are views showing an editing window 602 provided by the editing unit 154, which is another example of a user interface.
  • the editing window 602 includes a first area 611 and a second area 612.
  • the first area 611 a program tree is displayed.
  • the second area 612 the source code of the program selected from the program tree is displayed.
  • the program tree displayed in the first area 611 includes the logic of the sequence program 30 (for example, the program A and the program B) and the application program 32 (for example, RC1, RC2, RC_Sample, NC1, NC2, and NC2) called from the sequence program 30. NC_Sample).
  • the editing unit 154 displays a series of logic 630 of the sequence program 30 selected by the user in the program editing area 614 of the editing window 602. Further, the editing unit 154 displays the application program 32 called from the sequence program 30 as blocks 631 and 632 in the sequence program 30 in the program editing area 614. Further, the editing unit 154 displays, in the program editing area 614, tabs 613a, 613b, and 613c corresponding to the sequence program 30 selected by the user and the application program 32 called from the sequence program 30, respectively. The editing unit 154 may be able to highlight the tab currently displayed in the program editing area 614 to clearly indicate the currently selected tab to the user.
  • the editing unit 154 displays the source code of the selected application program 32 in the program editing area 614. Let it.
  • FIG. 6 shows a display example of the edit window 602 when the user selects the block 631 or the tab 613b.
  • the editing unit 154 displays the source code of the robot program RC1 corresponding to the block 631 or the tab 613b selected by the user in the program editing area 614 in an editable manner. The user can edit the source code displayed in the program editing area 614 using the written language.
  • editing unit 154 may highlight the tab selected in the program editing area 614 and highlight the selected program in the program tree displayed in the first area 611. Good.
  • FIG. 7 is a flowchart showing the flow of processing of the integrated controller 100 when a program is created or edited.
  • the user creates a program in the editing windows 601 and 602 provided by the editing unit 154 (step S11).
  • step S11 the user creates or edits the sequence program 30 (step S11a) and creates or edits the application program 32 called from the sequence program 30 in the editing windows 601 and 602 provided by the editing unit 154 (step S11b).
  • the program management unit 156 When a user creates or edits a program, the program management unit 156 collectively checks the grammar of the sequence program 30 and the application program 32 called from the sequence program according to the created or edited program. Then, it is compiled and built (step S12). The program management unit 156 converts the sequence program 30 into an execution format, and converts the application program 32 into a plurality of intermediate codes.
  • the program management unit 156 stores the built sequence program 30 and application program 32 in the storage 108.
  • the program management unit 156 stores the built sequence program 30 in the storage in both an execution format and a source code format. Further, the program management unit 156 associates the intermediate code of the built application program 32 with the source code and stores both in the storage 108.
  • the IEC program processing unit 150 scans the entire sequence program 30 stored in the storage 108 at a predetermined control cycle, and generates a control signal to the target device.
  • the control application processing unit 160 sequentially executes a plurality of intermediate codes corresponding to a plurality of command statements of the application program 32 called by the sequence program 30 one line at a time (one command statement) (step S13), and sends the command to the target device. To generate a control signal.
  • command words of the application program 32 are converted into the intermediate code when the program is built, it is not necessary to convert the instruction word into the intermediate code during the execution of the program, and the execution of the application program 32 can be performed at high speed. Become.
  • FIG. 8 is a timing chart showing an example of the timing of processing execution in the integrated controller 100.
  • the integrated controller 100 executes the sequence program 30 at each control cycle T1. Further, the integrated controller 100 executes the application program 1 which is one of the application programs 32 at every application execution cycle T21. Further, the integrated controller 100 executes the application program 2 which is another application program 32 at each application execution cycle T22.
  • the integrated controller 100 executes the sequence program 30 as a high-priority task by the function of the IEC program processing unit 150.
  • the high-priority task in each control cycle T1, an input / output refresh process 10, an output process 12 for outputting a control command value according to a sequence command included in the sequence program, and a control command value according to a motion command included in the sequence program are performed.
  • An output process 16 for outputting, an output process 14-1 for outputting a control command value according to the application program 1, and an output process 14-2 for outputting a control command value according to the application program 2 are performed.
  • the execution of the application program 1 and the application program 2 are set as low priority tasks 1 and 2, respectively.
  • the first control application processing unit 161 sequentially executes a plurality of intermediate codes corresponding to the statement of the application program 1 at each application execution cycle T21 (in the example shown in FIG. 8, twice the control cycle T1).
  • the second control application processing unit 162 sequentially executes a plurality of intermediate codes corresponding to the statement of the application program 2 at every application execution cycle T22 (in the example shown in FIG. 8, three times the control cycle T1). .
  • Each of the low-priority tasks only needs to be able to complete processing within the application execution cycle T21 or the application execution cycle T22 longer than the control cycle T1.
  • one of the low-priority tasks may be suspended (suspended) as shown in FIG.
  • one of the low-priority tasks is executed in parallel without suspending in a suspended state. May be processed.
  • the first control application processing unit 161 and the second control application processing unit 162 correspond to the intermediate statement corresponding to the statement called by the sequence program 30.
  • the codes are sequentially executed, and a control command value is calculated.
  • the application execution periods T21 and T22 can be set as integer multiples of the control period T1, or can be set to the same length as the control period T1, according to the type of the target application program 32.
  • the user can use the setting screen to determine which application program 32 is to be executed and which of the low-priority tasks 1 and 2 is to be executed. A configuration that can be set may be used.
  • FIG. 9 is a diagram showing an example of information displayed on the display unit 159 while the application program 32 is being executed.
  • the display unit 159 displays which statement in the application program 32 is being executed.
  • the intermediate code and the source code are stored in the storage 108 in association with each other. This allows the control application processing unit 160 to display which command statement in the application program 32 is being executed while the application program 32 is being executed.
  • the control application processing unit 160 displays a plurality of statements included in the application program 32 on the display unit, and executes any one of the statements by highlighting or enclosing the statement being executed. It may be shown to the user whether or not the user is performing the operation.
  • FIG. 10 is a schematic diagram conceptually showing an intermediate code generated in the integrated controller 100.
  • the application program 32 includes sequentially executed statements, and the time required for sequentially executing each statement changes according to the contents of each statement. Therefore, it is not easy to calculate the command value for each control cycle.
  • FIG. 10 shows, as an example of the application program 32, a code described in the G language used in the CNC.
  • the program management unit 156 interprets one or a plurality of command statements described in the application program 32, and calculates an intermediate value for calculating a command value for each control cycle based on the interpreted content. Generate code 35. Since the intermediate code 35 is generated for each one or a plurality of command statements described in the application program 32, one or a plurality of intermediate codes 35 are generated from one application program 32.
  • each of the intermediate codes 35 a function capable of calculating a command value by inputting the time (or time) of the control cycle may be defined. That is, the intermediate code 35 may be a function for the control application processing unit 160 to calculate a command value for each control cycle. By using such a function, the control application processing unit 160 can sequentially execute the intermediate code 35 and calculate a command value in each control cycle.
  • the control application processing unit 160 uses the intermediate code 1 and The command value is calculated periodically over a period.
  • the command values of the other intermediate codes 2 and 3 can be basically calculated over a plurality of control cycles.
  • the program management unit 156 generates an intermediate code from the application program 32 when building the sequence program 30 and the application program 32 collectively.
  • the application program 32 can be executed in synchronization with the execution of the sequence program 30 by the IEC program processing unit 150.
  • FIG. 11 is a schematic diagram for explaining an example of generating an intermediate code in the integrated controller 100.
  • the application program 32 that specifies the trajectory to be operated is sequentially executed, first, the command sentence included in the application program 32 is interpreted line by line ((1) program interpretation), The generated trajectory is internally generated ((2) trajectory generation). After the relationship between the trajectory and the position for each control cycle is determined, one or a plurality of functions indicating the trajectory generated internally by the integrated controller 100 are generated ((3) Function generation for each section) ).
  • the program management unit 156 may be configured to use the function of inputting the time of the control cycle and outputting the command value.
  • the trajectory generated internally by the integrated controller 100 is a combination of straight lines
  • the trajectory for each straight section is expressed by the relationship between time and speed.
  • the indicated functions f1 (t), f2 (t), f3 (t) are output.
  • the program management unit 156 may use the functions f1 (t), f2 (t), and f3 (t) output in this way as the intermediate code 35.
  • the program management unit 156 may output a single function defining the trajectory shown in FIG. 11 as an intermediate code. What kind of intermediate code 35 the program management unit 156 outputs may be appropriately designed in consideration of a required control cycle time width and the like.
  • an application program using the G language has been described as an example.
  • the present invention is not limited to this, and any program that is sequentially executed by an interpreter method such as an arbitrary robot language can be used. Any language may be used.
  • the program management unit 156 may output an arbitrary function as the intermediate code 35 according to the language used in the application program.
  • FIG. 12 is a diagram illustrating a functional configuration of the integrated controller 100 according to the modification.
  • the functional configuration of the integrated controller 100 is not limited to the configuration described with reference to FIG.
  • the integrated controller 100 may be configured to integrally include the input unit 158 and the display unit 159, or may not include the input unit 158 and the display unit 159 as illustrated in FIG. It may be a configuration.
  • the editing unit 154 of the integrated controller 100 may be able to display the editing window 601 on the display device 400 connected to the network 6 via the upper network interface 182. Then, the user refers to the editing window 601 displayed on the display device 400 and edits or creates a program from a touch panel provided on the display device 400 or a PC connected to the display device 400. It may be possible.
  • the editing unit 154 of the integrated controller 100 receives a user input from the display device 400 via the network 6 and causes the display device 400 to display the development environment.
  • the display device 400 functions as the input unit 158 and the display unit 159 illustrated in FIG.
  • the editing unit 154 of the integrated controller 100 may be able to provide a function of creating or editing a program executed on the integrated controller 100 online.
  • the control application processing unit 160 may be able to cause the display device 400 to display which statement in the application program is being executed during the execution of the application program.
  • control blocks of the integrated controller 100 are logic circuits (hardware) formed on an integrated circuit (IC chip) or the like. ) Or by software.
  • the integrated controller 100 includes a computer that executes instructions of a program that is software for realizing each function.
  • the computer includes, for example, one or more processors and a computer-readable recording medium storing the program. Then, in the computer, the object of the present invention is achieved when the processor reads the program from the recording medium and executes the program.
  • a CPU Central Processing Unit
  • the recording medium in addition to “temporary tangible medium”, for example, ROM (Read Only Memory), tape, disk, card, semiconductor memory, programmable logic circuit, and the like can be used. Further, a RAM (Random Access Memory) for expanding the program may be further provided.
  • the program may be supplied to the computer via an arbitrary transmission medium (a communication network, a broadcast wave, or the like) capable of transmitting the program.
  • a transmission medium a communication network, a broadcast wave, or the like
  • one embodiment of the present invention can also be realized in the form of a data signal embedded in a carrier wave, in which the program is embodied by electronic transmission.
  • a control device edits a first program, which is entirely scanned each time it is executed, and a second program, which is called from the first program and is sequentially executed, in one development environment in parallel.
  • An editing unit that provides a possible development tool; a program management unit that builds the first program and the second program in a lump; and executes the first program at a predetermined control cycle to perform the control.
  • a first execution unit that generates a command to control the first drive device in each cycle; and sequentially executes a plurality of command statements included in the second program to sequentially generate a command to control the second drive device. And a second execution unit.
  • the first program (PLC program) and the second program called from the first program can be collectively created or edited in the same development environment and built.
  • the user can easily create or edit the first program and the second program written in different languages and executed by different scheduling methods in the same development environment. Therefore, for example, a first program for controlling a production line and a plurality of application programs for controlling each of a plurality of control targets (control applications) having different control periods can be easily created or edited. , Can be controlled synchronously by a user-defined program.
  • the editing unit is configured to display, as the development environment, a first area for displaying a program tree and a source code of the selected program.
  • the user can confirm the processing flows of the first program and the second program at the same time in the same editing window. Further, the user can create or edit the first program and the second program called from the first program by an intuitive operation in the editing window. Further, since a sample program that can be edited by the user is provided in the editing window, the user can easily create a user-defined program.
  • the editing unit when a user specifies a position in the first program and selects the sample program, the editing unit performs The configuration is such that the selected sample program is set to be called from a designated position, and the code of the selected sample program can be edited.
  • the user can define the first program and the second program called from the first program by an intuitive operation, and synchronize the first program and the second program. Can be done. Further, the user can edit the code of the selected sample program by a simple operation of selecting a position to be edited.
  • the second execution unit may execute any one of the command statements in the second program during execution of the second program. Is displayed.
  • the user can confirm which statement is being executed from the displayed information. Therefore, the user can easily confirm whether the control application is performing an intended operation based on the defined statement, and can create or edit the statement as appropriate.
  • the program management unit converts the first program into an executable form, converts the second program into a plurality of intermediate codes,
  • the two execution units are configured to sequentially execute the plurality of intermediate codes corresponding to the plurality of instruction statements.
  • the first program when the program is built, the first program is converted into an executable form, and the second program is converted into a plurality of intermediate codes.
  • the second program is decoded at the time of executing the program, the intermediate code is generated, and the intermediate code is temporarily queued and executed.
  • the conversion to the intermediate code is not required at the time of executing the program, so that the application program can be executed at high speed.
  • the editing unit is configured to display, as the development environment, a first area for displaying a program tree and a source code of the selected program.
  • the user can define the first program and the second program called from the first program by an intuitive operation, and synchronize the first program and the second program. Then, the program can be created or edited. Further, the user can edit the code of the selected sample program by a simple operation of selecting a block or tab indicating the program to be edited.
  • Sequence program (1st program, PLC program) 32 Application program (second program) 34 Intermediate code 100 Integrated controller 146 Touch panel 150 IEC program processing unit (first execution unit) 154 editing unit 156 program management unit 158 input unit 159 display unit 160 control application processing unit (second execution unit) 161 first control application processing unit (second execution unit) 162 second control application processing unit (second execution unit) 500 Field device (control application) 520 Robot 530 Machine tool 540 Servo driver 601, 602 Edit window 611 First area 612 Second area 613a, 613b, 613c Tab 621, 622, 631, 632 Block

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Geometry (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)
  • Numerical Control (AREA)

Abstract

PLCプログラムと、PLCプログラムから呼び出される1又は複数のアプリケーションプログラムとを纏めて作成することができる技術を提供する。第1プログラム(30)と、第2プログラム(32)とを、1つの開発環境で編集可能な開発ツールを提供する編集部(154)と、前記第1プログラム(30)と、前記第2プログラム(32)とを一括でビルドするプログラム管理部(156)と、所定の制御周期毎に前記第1プログラム(30)を実行する第1実行部(150)と、前記第2プログラムに含まれる複数の命令文を逐次実行する第2実行部(160)とを備える。

Description

制御装置
 本発明は、制御対象の制御を実行する制御装置に関する。
 従来、製造現場において用いられる工作機械やロボットなどの複数の制御アプリケーション同士がどのように連携するかの使用を決定し、その使用を実現するためのラダープログラムが工作機械メーカにより提供されている。これらのラダープログラムは、ユーザによる編集ができず、ユーザが機能の追加を望む場合には、ラダープログラムの改造を工作機械メーカに依頼する必要があった。また、制御アプリケーション毎にプログラムが独立しており、制御アプリケーション同士が連携動作を行うような場合には、それぞれのプログラムから、各制御アプリケーションがどのような動作を理解する必要があった。
 そこで、制御アプリケーション同士の連携動作を、ユーザが加工プログラムで決定することができるように技術が提供されている(例えば、特許文献1参照)。特許文献1に記載の技術では、工作機械用命令文と、ロボット用命令文とを含む加工プログラムをユーザが工作機械と、ロボットとを制御する制御装置に入力可能である。そして、制御装置は、加工プログラムに含まれている工作機械用命令文を工作機械制御手段に転送し、ロボット用命令文をロボット制御手段へ転送する。これにより、工作機械とロボットとを連携するためのラダープログラムを必要とせず、工作機械とロボットとをユーザ定義の加工プログラムにより連携可能としている。
日本国公開特許公報「特開2014-241018号公報(2014年12月25日公開)」
 ところで、生産現場においてPLC(Programmable Logic Controller)により、生産全体が監視および管理されている場合には、PLCプログラムと、NCプログラムやロボットプログラム等のアプリケーションプログラムとの両方に制御信号のやり取りに関する記述を行う必要がある。しかしながら、PLCプログラム、NCプログラム、ロボットプログラムのそれぞれは、異なる言語により記述されている。また、PLCプログラムと、アプリケーションプログラムとでは制御周期が異なる。
 このため、PLCにより生産全体を監視および管理し、生産ラインと各制御アプリケーションとのタイミングを合わせるための、PLCプログラム、およびアプリケーションプログラムとは、上述のような従来技術では、纏めて作成することはできなかった。
 本発明の一態様は、上述した事情に鑑みてなされたものであり、PLCプログラムと、PLCプログラムから呼び出される1又は複数のアプリケーションプログラムとを纏めて作成することができる技術を実現することを目的とする。
 前記の課題を解決するために、本発明の一態様に係る制御装置は、実行毎に全体がスキャンされる第1プログラムと、前記第1プログラムから呼び出され逐次実行される第2プログラムとを、並行して1つの開発環境で編集可能な開発ツールを提供する編集部と、前記第1プログラムと、前記第2プログラムとを一括でビルドするプログラム管理部と、所定の制御周期毎に前記第1プログラムを実行することで、該制御周期毎に第1駆動装置を制御する指令を生成する第1実行部と、前記第2プログラムに含まれる複数の命令文を逐次実行することで、第2駆動装置を制御する指令を逐次生成する第2実行部とを備える構成である。
 本発明の一態様によれば、PLCプログラムと、PLCプログラムから呼び出される1又は複数のアプリケーションプログラムとを纏めて作成することができる。
本発明の実施形態1に係る統合コントローラが使用されるシステム環境の概要を示す図である。 統合コントローラの要部構成を示すブロック図である。 統合コントローラの機能構成の一例を示す模式図である。 編集ウィンドウの一例を示す図である。 編集ウィンドウの変形例を示す図である。 編集ウィンドウの変形例を示す図である。 統合コントローラの処理の流れを示すフローチャートである。 統合コントローラの処理実行のタイミングチャートである。 アプリケーションプログラム実行中の表示例を示す図である。 中間コードを概念的に示す模式図である。 中間コードの生成例を説明するための模式図である。 変形例の統合コントローラの要部構成を示すブロック図である。
 以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。
 §1 適用例
 図1を用いて、本発明が適用される場面の一例について説明する。図1は、本実施形態に係る制御装置の一例である統合コントローラ100が使用されるシステム環境の概要を示す図である。統合コントローラ100は、モーションネットワークケーブル2を介してロボット520や工作機械530等の制御対象に接続されている。また、統合コントローラ100は、イーサネット(登録商標)等によるネットワーク6を介してサーバ装置300に接続されている。
 統合コントローラ100は、ロボット520や工作機械530等の制御対象を統括的に制御する装置である。また、統合コントローラ100は、各種センサ入力に応じて、ベルトコンベア544のサーボモータ542を駆動するサーボドライバ540を制御するPLC(Programmable Logic Controller)としても機能する。
 統合コントローラ100は、PLCプログラムと、ロボット520や工作機械530等の制御アプリケーションのそれぞれを制御するためのアプリケーションプログラムとを統合的に実装した装置である。統合コントローラ100は、制御対象に応じたプログラムを実行し、これらの制御対象を制御することで、生産ラインと各制御アプリケーションとを同期制御する。
 PLCプログラムは、ラダー言語により記述されたプログラムであり、実行毎に全体がスキャンされる。PLCプログラムは、例えば、国際電気標準会議(International Electrotechnical Commission:IEC)によって規定された国際規格IEC61131-3に従って記述されている。
 ロボット520を制御するためのロボットプログラムは、一般的に体系化された所謂ロボット用言語により記述されている。
 工作機械530を制御するためのNCプログラムは、一般的にISOによって規格化されたG-コードにより記述されている。
 統合コントローラ100によって実行されるこれらのプログラムのそれぞれは、ユーザによって作成、または編集可能である。統合コントローラ100は、PLCプログラム、およびアプリケーションプログラムを1つの開発環境で編集可能とする開発ツールをユーザに提供する。また、統合コントローラ100は、PLCプログラムと、アプリケーションプログラムとを、一括でビルドし、管理する。
 このように、統合コントローラ100は、生産ラインと各制御アプリケーションとを同期制御するとともに、各制御対象に応じたプログラムを1つの開発環境で編集可能とする開発ツールをユーザに提供する。これによりユーザは、PLCプログラムと、PLCプログラムから呼び出される、ロボット520や工作機械530等の制御アプリケーションのアプリケーションプログラムとを纏めて作成することができる。
 §2 構成例
 〔統合コントローラ100の構成について〕
 図1、図2、および図3に基づいて、本発明の実施形態に係る統合コントローラ100の構成について詳細に説明する。図1は、統合コントローラ100が使用されるシステム環境の概要を示す図である。図2は、統合コントローラ100の要部構成を示すブロック図である。図3は、統合コントローラ100の機能構成の一例を示す模式図である。
 統合コントローラ100は、産業用コントローラであり、制御対象の装置を制御する。統合コントローラ100は、モーションネットワークケーブル2を介して1または複数のフィールド機器500と接続されフィールド機器500との間でデータを遣り取りする。
 また、統合コントローラ100は、タッチパネル146を備える。タッチパネル146は、統合コントローラ100に対するユーザ操作を受け付ける入力部として機能するとともに、統合コントローラ100による演算結果を表示する表示部として機能する。
 モーションネットワークケーブル2は、データの到達時間が保証される、定周期通信を行うバスまたはネットワークを採用することが好ましい。このような定周期通信を行うバスまたはネットワークとしては、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などが知られている。
 フィールド機器500は、生産ラインなどで用いられるリモートI/O(Input/Output)装置510、ロボット520、ロボットコントローラ522、工作機械530、サーボドライバ540、およびサーボモータ542等である。フィールド機器500のそれぞれは、統合コントローラ100によって生成される指令に応じて、例えば以下のように動作する。サーボモータ542は、コンベア544を駆動して、NC工作機械530の前に配置されたワークテーブル546にワークWを搬送する。ロボット520は、ワークテーブル546上の処理前のワークWをNC工作機械530内に配置し、NC工作機械530での処理済ワークWを取り出してワークテーブル546上に配置する。
 なお、統合コントローラ100は、数100μsecオーダ~数10msecオーダのごく短い周期でフィールド機器500との間でデータを遣り取りし、フィールド機器500に対する制御指令などのデータを送信する。
 また、統合コントローラ100は、ネットワーク6を介して、サーバ装置300や、1または複数の表示装置400に接続されている。ネットワーク6には、一般的なネットワークプロトコルであるイーサネット(登録商標)やEtherNet/IP(登録商標)が採用されてもよい。
 サーバ装置300は、データベースシステムや、製造実行システム(MES:Manu facturing Execution System)などである。サーバ装置300は、フィールド機器500のそれぞれから情報を取得して、生産全体を監視および管理する機能を有していてもよく、オーダ情報、品質情報、出荷情報などを扱うこともできる。
 表示装置400は、統合コントローラ100に対するユーザ操作に応じた内容を表示する。また、表示装置400は、統合コントローラ100による演算結果等をグラフィカルに表示する。
 〔統合コントローラ100のハードウェア構成例〕
 図2は、統合コントローラ100のハードウェア構成例を示すブロック図である。図2に示すように、統合コントローラ100は、プロセッサ102、チップセット104、主メモリ106、およびストレージ108を備えている。また、統合コントローラ100は、上位ネットワークコントローラ110、メモリカードインタフェース114、内部バスコントローラ120、およびフィールドネットワークコントローラ130を含んでいる。また、統合コントローラ100は、タッチパネル146を備えている。
 プロセッサ102は、CPUユニットと称される演算処理部であり、図示は省略するが、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、GPU(Graphics Processing Unit)などで構成されている。プロセッサ102としては、複数のコアを有する構成を採用してもよいし、プロセッサ102を複数配置してもよい。すなわち、統合コントローラ100は、1または複数のプロセッサ102、および/または、1または複数のコアを有するプロセッサ102を有している。プロセッサ102は、ストレージ108に格納された各種プログラムを読出して、主メモリ106に展開して実行することで、制御対象に応じた制御、および、後述するような各種処理を実現する。
 チップセット104は、プロセッサ102およびその周辺エレメントを制御することで、統合コントローラ100全体としての処理を実現する。
 主メモリ106は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成されている。
 ストレージ108は、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)などの不揮発性記憶装置で構成されている。ストレージ108には、統合コントローラ100が基本的な機能を実現するためのシステムプログラム34が格納されている。また、ストレージ108には、統合コントローラ100の制御対象の装置に応じて作成されるシーケンスプログラム30、および1または複数のアプリケーションプログラム32が格納されている。
 シーケンスプログラム30は、PLCプログラムであり、一定の制御周期毎に実行される。また、シーケンスプログラム30は、実行毎に全体がスキャンされる。シーケンスプログラム30を実行することで、統合コントローラ100は、センサ入力に応じ駆動装置(サーボモータ)を制御する等の、対象装置の状態やセンサ等の信号に基づいたシーケンス制御を行う。
 アプリケーションプログラム32は、ロボット520や工作機械530等の制御アプリケーションを制御するプログラムであり、ロボット520を制御するためのロボットプログラムや、工作機械530を制御するためのNCプログラムである。アプリケーションプログラム32は、シーケンスプログラム30から呼び出されて逐次実行される。以下の説明において、シーケンスプログラム30を第1のプログラム、アプリケーションプログラム32を第2のプログラムとも称する。
 上位ネットワークコントローラ110は、上位ネットワーク6を介して、サーバ装置300や表示装置400などとの間のデータの遣り取りを制御する。
 メモリカードインタフェース114は、メモリカード116が着脱可能に構成されており、メモリカード116に対してデータを書込み、メモリカード116から各種データを読出すことが可能になっている。
 内部バスコントローラ120は、統合コントローラ100に装着されるI/Oユニット122との間のデータの遣り取りを制御する。
 フィールドネットワークコントローラ130は、モーションネットワークケーブル2を介して接続されたフィールドデバイスとの間のデータの遣り取りを制御する。
 なお、プロセッサ102がプログラムを実行することで必要な機能を提供する構成に限らず、提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。また、統合コントローラ100の主要部を、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 タッチパネル146は、統合コントローラ100の入出力部として機能する。
 〔統合コントローラ100の機能構成について〕
 図3は、統合コントローラ100の機能構成の一例を示す模式図である。図3に示すように、統合コントローラ100は、編集部154、プログラム管理部156、入力部158、および表示部159を備えている。また、統合コントローラ100は、IECプログラム処理部150、フィールドネットワークインタフェース180、上位ネットワークインタフェース182、および第1制御アプリケーション処理部161、第2制御アプリケーション処理部162、・・・(以下、「制御アプリケーション処理部160」とも総称する。)を含んでいる。なお、IECプログラム処理部150を第1実行部、制御アプリケーション処理部160を第2実行部とも称する。
 編集部154は、統合コントローラ100で実行されるシーケンスプログラム30、およびアプリケーションプログラム32とを、並行して1つの開発環境で作成または編集可能な開発ツールを提供する。編集部154によって作成または編集されたシーケンスプログラム30、およびアプリケーションプログラム32は、ストレージ108に格納される。また、編集部154は、統合コントローラ100に接続される各種デバイスのパラメータ(コンフィギュレーション)を設定するための設定環境を提供してもよい。
 プログラム管理部156は、編集部154によって作成または編集されたシーケンスプログラム30と、アプリケーションプログラム32とを、一括してコンパイルし、リンクすることで、ビルドする。
 プログラム管理部156は、シーケンスプログラム30と、アプリケーションプログラム32とを、一括してビルドすることで、シーケンスプログラム30を実行形式に変換し、アプリケーションプログラム32を複数の中間コードに変換する。このように、プログラム管理部156は、シーケンスプログラム30と、アプリケーションプログラム32とを、一括してビルドするとともに、アプリケーションプログラム32を、実行前に予め、中間コードに変換する。
 プログラム管理部156は、ビルドされたシーケンスプログラム30、アプリケーションプログラム32、および中間コードを、ストレージ108に格納する。なお、中間コードは、制御周期毎に指令値を演算するための命令を包含する概念であり、1または複数の命令、あるいは、1または複数の関数を含む。
 入力部158は、ユーザ操作の入力を受けつける。表示部159は、入力部158に対するユーザ操作に応じた画面を表示する。なお、本実施形態では、図1に示したタッチパネル146が、入力部158と、表示部159との機能を兼ねている。詳細については後述するが、ユーザは、タッチパネル146への操作によって、編集部154によるシーケンスプログラム30、およびアプリケーションプログラム32の編集を実行することが出来る。
 IECプログラム処理部150は、予め定められた所定の制御周期毎にシーケンスプログラム30を実行(スキャン)することで、シーケンスプログラム30に含まれるモーション命令に従って、当該制御周期毎に、PLCプログラムにより制御されるサーボドライバ540などの駆動装置(第1駆動装置)を制御する1または複数の指令を生成し、出力する。IECプログラム処理部150は、シーケンスプログラム30に含まれる各入力条件(センサー入力値等)が成立しているか否かを所定の制御周期毎(例えば、1μ秒毎)に判定する。IECプログラム処理部150から出力された指令は、主メモリ106に格納される。
 制御アプリケーション処理部160は、シーケンスプログラム30から呼び出されたアプリケーションプログラム32に含まれる複数の命令文の各行を逐次実行することで、ロボット520や工作機械530などの制御アプリケーション(第2駆動装置)を制御する指令を逐次生成する。IECプログラム処理部150は、シーケンスプログラム30に含まれる入力条件が成立している場合に、該入力条件に対応するアプリケーションプログラム32を呼び出す。
 つまり、制御アプリケーション処理部160は、IECプログラム処理部150による演算処理と同期して、指令値の演算処理を実行する。制御アプリケーション処理部160は、ストレージ108に予め格納されている中間コード35に従って、指令を生成し、生成した指令を主メモリ106に対して出力する。
 IECプログラム処理部150は、主メモリ106に格納された制御アプリケーション処理部160による処理結果を参照することができる。
 フィールドネットワークインタフェース180は、IECプログラム処理部150により生成された1または複数の指令(基本的には、論理値)と、制御アプリケーション処理部160により生成された1または複数の指令(基本的には、数値)とを制御周期毎にフィールド機器500へ出力する。
 〔編集部のユーザインタフェースについて〕
 図4は、編集部154が提供する、シーケンスプログラム30と、アプリケーションプログラム32とを編集する開発ツールのユーザインタフェースの一例である編集ウィンドウ601を示す図である。編集ウィンドウ601は、表示部159の機能により、タッチパネル146に表示され、ユーザのタッチ位置に応じた入力が入力部158により検出される。
 図4に示すように、編集ウィンドウ601は、第1エリア611と、第2エリア612と、を含んでいる。第1エリア611には、プログラムツリーが表示される。第2エリア612には、プログラムツリーから選択されたプログラムのソースコードが表示される。また、第2エリア612には、プログラム編集エリア614に表示されたプログラムを編集するために用いるツールを含むツールボックス615が表示されている。ユーザはツールボックス615内のツールを例えば、ドラックアンドドロップによってプログラム編集エリア614に導入して、シーケンスプログラム30の作成または編集を行うことができる。
 第1エリア611に表示されたプログラムツリーには、シーケンスプログラム30のロジック(例えばプログラムA,プログラムB)と、ロボット520や工作機械530等の第2駆動装置を制御するためのアプリケーションプログラム32(例えば、RC1,RC2,RC_Sample,NC1,NC2,NC_Sample)と、が含まれている。
 プログラムツリーに含まれているアプリケーションプログラム32のうち、RC1,RC2,NC1,NC2等は、ユーザにより作成されたプログラムである。また、プログラムツリーに含まれているアプリケーションプログラム32のうち、RC_SampleやNC_Sampleは、例えば統合コントローラ100のメーカにより予め用意されているサンプルプログラムである。サンプルプログラムのNC_Sampleは、例えば、ISOによって規格化されているGコードに基づいたソースコードである。
 ユーザが、第1エリア611においてプログラムツリーの中から、サンプルプログラムを選択すると、編集部154は、選択されたサンプルプログラムを、編集可能なアプリケーションプログラム32として使用可能とする。
 また、編集部154は、ユーザによってロジックが選択されると、選択されたロジックに応じたシーケンスプログラム30、およびアプリケーションプログラム32を第2エリア612のプログラム編集エリア614に表示する。図4は、ユーザが、第1エリア611においてPLCプログラムのプログラムAを選択した場合の例を示している。なお、第2エリア612には、各PLCプログラムA,B・・・が、タブ613a,613B・・・にそれぞれ表示され、タブ613a,613B・・を切り替えることで、プログラム編集エリア614に表示されるプログラムを切り替えることができてもよい。
 プログラム編集エリア614には、ラダー言語で記述された縦に長いシーケンスプログラム30の一連のロジック620と、ロジック620の各条件(X1,X2,・・・)が成立している場合に実行されるアプリケーションプログラム32の中身が記述されているプログラミングブロック621,622,・・・とが表示される。
 図4の例では、シーケンスプログラム30のX1の条件が成立している場合に実行されるプログラミングブロック621の中身は、Gコードで記述されたNCプログラムである。また、シーケンスプログラム30のX2の条件が成立している場合に実行されるプログラミングブロック622の中身は、ロボット言語で記述されたロボットプログラムである。
 このように、編集部154は、ラダー言語で記述されたPLCプログラムと、Gコードで記述されたNCプログラムと、ロボット言語で記述されたロボットプログラムとを、1つの開発環境で編集可能とする。すなわち、編集部154は、制御スケジュール、制御対象の装置、およびプログラミング言語が互いに異なる複数のプログラムを、1つの開発環境で編集可能とする。
 具体例を説明すると、例えば、ユーザは、第1エリア611、または第2エリア612においてシーケンスプログラム30(ロジック)における編集位置を指定し、かつ、使用するサンプルプログラムを選択する。ユーザによって、シーケンスプログラム30における編集位置が指定され、かつ、使用するサンプルプログラムが選択されると、編集部154は、シーケンスプログラム30における指定された位置から、選択されたサンプルプログラムを呼び出すよう設定し、かつ、選択されたサンプルプログラムのコードを編集可能にプログラム編集エリア614に表示する。
 例えば、ユーザが、ロジックからプログラムAのX1の右側を編集位置として指定し、かつ、使用するサンプルプログラムとしてNC_Sampleを選択すると、プログラミングブロック621が設けられ、プログラミングブロック621の中にNC_Sampleのソースコードが展開される。プログラミングブロック621はソースコードを編集可能なサブウィンドウ(スクロールバー含む)としても機能する。
 サンプルプログラムには、複数の命令文が含まれている。図4に示した例では、プログラムAにおいて、X1の条件が成立した場合には、G01X100Y100,G01X200Y100・・・の複数の命令文が逐次実行されるプログラムが示されている。また、プログラムAにおいて、X2の条件が成立した場合には、MOVEP1,MOVEP2・・・の複数の命令文が逐次実行されるプログラムが示されている。ユーザは、プログラム編集エリア614の各ブロック621,622内に表示された命令文を記述された言語を用いて編集することができる。
 ユーザは、プログラム編集エリア614において編集した命令文を含むアプリケーションプログラムを新たなアプリケーションプログラムとして保存することもでき、既存のアプリケーションプログラムを上書きして保存することもできる。このように、ユーザによって定義されたプログラム、および、予め用意されたサンプルプログラムは、流用性が高いものであり、ユーザは、ユーザ定義のプログラムを容易に作成することができる。
 〔編集部のユーザインタフェースの変形例〕
 図5、および図6は、編集部154が提供する、ユーザインタフェースの別の例である編集ウィンドウ602を示す図である。図5に示すように、編集ウィンドウ602は、第1エリア611と、第2エリア612と、を含んでいる。第1エリア611には、プログラムツリーが表示される。第2エリア612には、プログラムツリーから選択されたプログラムのソースコードが表示される。
 第1エリア611に表示されたプログラムツリーには、シーケンスプログラム30のロジック(例えばプログラムA,プログラムB)と、シーケンスプログラム30から呼び出されるアプリケーションプログラム32(例えば、RC1,RC2,RC_Sample,NC1,NC2,NC_Sample)とを含んでいる。
 編集部154は、編集ウィンドウ602のプログラム編集エリア614に、ユーザによって選択されたシーケンスプログラム30の一連のロジック630を表示する。また編集部154は、プログラム編集エリア614に、シーケンスプログラム30から呼び出されるアプリケーションプログラム32を、シーケンスプログラム30の中のブロック631,632として表示する。また、編集部154は、プログラム編集エリア614に、ユーザによって選択されたシーケンスプログラム30と、当該シーケンスプログラム30から呼びされるアプリケーションプログラム32とのそれぞれに対応するタブ613a,613b,613cを表示する。編集部154は、プログラム編集エリア614に現在表示されているタブをハイライト表示することで、現在選択されているタブをユーザに明示することができてもよい。
 ユーザが、シーケンスプログラム30の中のブロックとして表示されたアプリケーションプログラム32、または当該アプリケーションプログラムを示すタブを選択すると、編集部154は、プログラム編集エリア614に選択されたアプリケーションプログラム32のソースコードを表示させる。
 図6は、ユーザが、ブロック631、またはタブ613bを選択した場合の編集ウィンドウ602の表示例を示している。図6に示すように、編集部154は、ユーザによって選択されたブロック631、またはタブ613bに応じたロボットプログラムであるRC1のソースコードを、編集可能にプログラム編集エリア614に表示する。ユーザは、プログラム編集エリア614に表示されたソースコードを記述された言語を用いて編集することができる。
 なお、編集部154は、プログラム編集エリア614において選択されているタブをハイライト表示するとともに、選択中のプログラムを、第1エリア611に表示されたプログラムツリーにおいてハイライト表示することができてもよい。
 〔統合コントローラ100の処理フローについて〕
 図7は、プログラムが作成または編集される場合の、統合コントローラ100の処理の流れを示すフローチャートである。ユーザによって、編集部154が提供する編集ウィンドウ601,602において、プログラムの作成が行われる(ステップS11)。ステップS11において、ユーザは、編集部154が提供する編集ウィンドウ601,602において、シーケンスプログラム30の作成または編集(ステップS11a)、および当該シーケンスプログラム30から呼び出されるアプリケーションプログラム32の作成または編集(ステップS11b)を、上述のように1つの開発環境において並行して行うことができる。
 プログラム管理部156は、ユーザによってプログラムの作成や編集が行われると、作成または編集されたプログラムに応じた、シーケンスプログラム30と、当該シーケンスプログラムから呼び出されるアプリケーションプログラム32とを、一括して文法チェックおよびコンパイルし、ビルドする(ステップS12)。プログラム管理部156は、シーケンスプログラム30を実行形式に変換し、アプリケーションプログラム32を複数の中間コードに変換する。
 プログラム管理部156は、ビルドしたシーケンスプログラム30、およびアプリケーションプログラム32をストレージ108に格納する。プログラム管理部156は、ビルドされたシーケンスプログラム30を実行形式と、ソースコードとの両形式でストレージに格納する。また、プログラム管理部156は、ビルドされアプリケーションプログラム32の中間コードと、ソースコードとを対応付けて、両方をストレージ108に格納する。
 IECプログラム処理部150は、ストレージ108に格納されたシーケンスプログラム30の全体を所定の制御周期毎にスキャンし、対象装置への制御信号を生成する。制御アプリケーション処理部160は、シーケンスプログラム30に呼び出されたアプリケーションプログラム32の、複数の命令文に対応する複数の中間コードを一行(1つの命令文)ずつ逐次実行し(ステップS13)、対象装置への制御信号を生成する。
 このように、本実施形態では、プログラムのビルド時にアプリケーションプログラム32の命令語が中間コードに変換されるため、プログラムの実行中に中間コードに変換する必要がなく、アプリケーションプログラム32の実行が高速になる。
 〔統合コントローラ100における処理実行のタイミング〕
 図8は、統合コントローラ100における処理実行のタイミングの一例を示すタイミングチャートである。図8に示すように、統合コントローラ100は、制御周期T1毎に、シーケンスプログラム30を実行する。また、統合コントローラ100は、アプリケーション実行周期T21毎に、アプリケーションプログラム32の1つであるアプリケーションプログラム1を実行する。また、統合コントローラ100は、アプリケーション実行周期T22毎に別のアプリケーションプログラム32であるアプリケーションプログラム2を実行する。
 統合コントローラ100は、IECプログラム処理部150の機能により、シーケンスプログラム30を高優先タスクとして実行する。高優先タスクでは、各制御周期T1内において、入出力リフレッシュ処理10と、シーケンスプログラムに含まれるシーケンス命令に従う制御指令値を出力する出力処理12と、シーケンスプログラムに含まれるモーション命令に従う制御指令値を出力する出力処理16と、アプリケーションプログラム1に従う制御指令値を出力する出力処理14-1と、アプリケーションプログラム2に従う制御指令値を出力する出力処理14-2とが行われる。
 アプリケーションプログラム1およびアプリケーションプログラム2の実行は、それぞれ低優先タスク1,2として設定されている。第1制御アプリケーション処理部161は、アプリケーション実行周期T21(図8に示す例では、制御周期T1の2倍)毎に、アプリケーションプログラム1の命令文に対応する複数の中間コードを逐次実行する。また、第2制御アプリケーション処理部162は、アプリケーション実行周期T22(図8に示す例では、制御周期T1の3倍)毎に、アプリケーションプログラム2の命令文に対応する複数の中間コードを逐次実行する。
 低優先タスクの各々は、制御周期T1より長いアプリケーション実行周期T21またはアプリケーション実行周期T22内に処理を完了できればよい。複数の低優先タスクを同時実行できない場合には、図8に示したように、一方の低優先タスクは中断(サスペンド)状態で待機させてもよい。本実施形態では、アプリケーションプログラム1およびアプリケーションプログラム2をそれぞれ処理する互いに独立した2つのアプリケーション処理部161,162が備えられているため、一方の低優先タスクを中断状態で待機させることなく、並行して処理してもよい。
 高優先タスクの出力処理14-1、および出力処理14-2においては、第1制御アプリケーション処理部161、および第2制御アプリケーション処理部162により、シーケンスプログラム30に呼び出された命令文に対応する中間コードが逐次実行され、制御指令値が算出される。
 なお、アプリケーション実行周期T21が制御周期T1の2倍であり、アプリケーション実行周期T22が制御周期T1の3倍である場合を例示したが、これに限られるものではない。アプリケーション実行周期T21,T22は、対象となるアプリケーションプログラム32の種類に応じて、制御周期T1の整数倍として設定でき、制御周期T1と同じ長さに設定することもできる。また、複数のアプリケーションプログラム32が存在する場合には、ユーザは、どのアプリケーションプログラム32を実行するか、および低優先タスク1、または低優先タスク2の何れで実行するかを、設定画面を使って設定できる構成であってもよい。
 図9は、アプリケーションプログラム32の実行中に、表示部159に表示される情報の一例を示す図である。図9に示すように、表示部159には、アプリケーションプログラム32の中のいずれの命令文が実行されているのかが表示される。上述したように、プログラム管理部156によってビルドされたアプリケーションプログラム32は、中間コードと、ソースコードとが対応付けてストレージ108に記憶されている。これにより、制御アプリケーション処理部160は、アプリケーションプログラム32の実行中に、アプリケーションプログラム32の中のいずれの命令文を実行しているかを表示させることが出来る。制御アプリケーション処理部160は、アプリケーションプログラム32に含まれる複数の命令文を表示部に表示すると共に、実行中の命令文をハイライトする、または枠で囲む等の方法により、いずれの命令文を実行しているかをユーザに提示してもよい。
 〔中間コードについて〕
 次に、プログラム管理部156によって、アプリケーションプログラム32の命令文が変換されて生成された中間コードの一例について説明する。
 図10は、統合コントローラ100において生成される中間コードを概念的に示す模式図である。図10に示すように、アプリケーションプログラム32は、逐次実行される命令文を含んでおり、各命令文を逐次実行した場合に必要となる時間は、各命令文の内容に応じて変化する。そのため、制御周期毎に指令値を演算することが容易ではない。なお、図10には、アプリケーションプログラム32の一例として、CNCで用いられるG言語にて記述されたコードを示す。
 本実施の形態では、プログラム管理部156は、アプリケーションプログラム32に記述された1または複数の命令文を解釈し、その解釈された内容に基づいて、制御周期毎に指令値を演算するための中間コード35を生成する。中間コード35は、アプリケーションプログラム32に記述された1または複数の命令文毎に生成されるので、1つのアプリケーションプログラム32から1または複数の中間コード35が生成される。
 中間コード35の各々においては、制御周期の時刻(あるいは、時間)を入力として、指令値を演算できる関数が規定されていてもよい。すなわち、中間コード35は、制御アプリケーション処理部160が制御周期毎に指令値を演算するための関数であってもよい。このような関数を用いることで、制御アプリケーション処理部160は、中間コード35を逐次実行して、各制御周期における指令値を演算できる。
 例えば、1番目の中間コード1が制御周期の10倍分の期間に亘って指令値を規定するものであるとすると、制御アプリケーション処理部160は、中間コード1を用いて、10制御周期分の期間に亘って指令値を周期的に演算する。同様に、他の中間コード2および中間コード3についても、基本的には、複数の制御周期に亘って指令値を演算できるものとなる。
 プログラム管理部156は、シーケンスプログラム30と、アプリケーションプログラム32とを一括してビルドする際に、アプリケーションプログラム32から中間コードを生成する。これにより、IECプログラム処理部150によるシーケンスプログラム30の実行と同期して、アプリケーションプログラム32を実行させることができる。
 図11は、統合コントローラ100における中間コードの生成例を説明するための模式図である。図11に示すように、例えば、動作すべき軌道を規定するアプリケーションプログラム32が逐次実行されると、まず、アプリケーションプログラム32に含まれる命令文が一行ずつ解釈され((1)プログラム解釈)、規定された軌道が内部的に生成される((2)軌道生成)。これらの軌道と制御周期毎の位置との関係が決定された上で、統合コントローラ100の内部的に生成された軌道を示す1または複数の関数が生成される((3)区間毎の関数生成)。プログラム管理部156は、中間コード35の一例として、このように、制御周期の時間を入力とし、指令値を出力とする関数を用いる構成であってもよい。
 また、図11に示した例では、統合コントローラ100の内部的に生成された軌道は、直線の組み合わせであるので、直線区間毎(区間1~区間3)の軌道を時間と速度との関係を示す関数f1(t),f2(t),f3(t)が出力される。プログラム管理部156は、このように出力される関数f1(t),f2(t),f3(t)を中間コード35としてもよい。なお、プログラム管理部156は、図11に示す軌道を規定する単一の関数を中間コードとして出力してもよい。プログラム管理部156が、どのような中間コード35を出力するのかについては、要求される制御周期の時間幅などを考慮して、適宜設計されてもよい。
 なお、上述の図10および図11においては、一例として、G言語を用いたアプリケーションプログラムについて説明したが、これに限らず、任意のロボット言語などのインタプリタ方式で逐次実行されるプログラムであれば、どのような言語を用いてもよい。また、プログラム管理部156は、アプリケーションプログラムで用いられている言語に応じて、任意の関数を中間コード35として出力するようにしてもよい。
 〔変形例〕
 図12は、変形例の統合コントローラ100の機能構成を示す図である。統合コントローラ100の機能構成は、図3を用いて説明した構成に限られるものではない。統合コントローラ100は、上述したように、入力部158と、表示部159とを一体に備えた構成であってもよいし、図12に示すように、入力部158、および表示部159を備えない構成であってもよい。
 例えば、統合コントローラ100の編集部154は、上位ネットワークインタフェース182を介してネットワーク6に接続された表示装置400に編集ウィンドウ601を表示することができてもよい。そして、ユーザは、表示装置400に表示された編集ウィンドウ601を参照して、表示装置400に設けられたタッチパネルや、表示装置400に接続されたPCなどから、プログラムの編集や作成を行うことができてもよい。統合コントローラ100の編集部154は、ネットワーク6を介して、表示装置400からユーザ入力を受け取り、表示装置400に開発環境を表示させる。表示装置400は、図3に示す入力部158および表示部159として機能する。このように統合コントローラ100の編集部154は、統合コントローラ100上で実行されるプログラムを、オンラインで作成または編集する機能を提供することができてもよい。
 また、制御アプリケーション処理部160は、アプリケーションプログラムの実行中に、アプリケーションプログラムの中のいずれの命令文を実行しているかを、表示装置400に表示させることができてもよい。
 〔ソフトウェアによる実現例〕
 統合コントローラ100の制御ブロック(特に編集部154、プログラム管理部156、制御アプリケーション実行部161,162、およびIECプログラム処理部150)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、ソフトウェアによって実現してもよい。
 後者の場合、統合コントローラ100は、各機能を実現するソフトウェアであるプログラムの命令を実行するコンピュータを備えている。このコンピュータは、例えば1つ以上のプロセッサを備えていると共に、前記プログラムを記憶したコンピュータ読み取り可能な記録媒体を備えている。そして、前記コンピュータにおいて、前記プロセッサが前記プログラムを前記記録媒体から読み取って実行することにより、本発明の目的が達成される。前記プロセッサとしては、例えばCPU(Central Processing Unit)を用いることができる。前記記録媒体としては、「一時的でない有形の媒体」、例えば、ROM(Read Only Memory)等の他、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、前記プログラムを展開するRAM(Random Access Memory)などをさらに備えていてもよい。また、前記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して前記コンピュータに供給されてもよい。なお、本発明の一態様は、前記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。
 〔まとめ〕
 本発明の一態様に係る制御装置は、実行毎に全体がスキャンされる第1プログラムと、前記第1プログラムから呼び出され逐次実行される第2プログラムとを、並行して1つの開発環境で編集可能な開発ツールを提供する編集部と、前記第1プログラムと、前記第2プログラムとを一括でビルドするプログラム管理部と、所定の制御周期毎に前記第1プログラムを実行することで、該制御周期毎に第1駆動装置を制御する指令を生成する第1実行部と、前記第2プログラムに含まれる複数の命令文を逐次実行することで、第2駆動装置を制御する指令を逐次生成する第2実行部とを備える構成である。
 前記の構成によれば、第1プログラム(PLCプログラム)と、第1プログラムから呼び出される第2プログラムとを、を同一の開発環境において纏めて作成または編集し、ビルドすることができる。これにより、ユーザは、各々異なる言語で記述され、かつ、各々異なるスケジューリング方式で実行される第1プログラムと、第2プログラムとを同一の開発環境において簡単に作成または編集することができる。よって、例えば、制御周期が異なる、生産ラインを制御するための第1プログラムと、複数の制御対象(制御アプリケーション)のそれぞれを制御するための複数のアプリケーションプログラムとを、容易に作成または編集して、ユーザ定義のプログラムによって同期制御させることができる。
 また、本発明の一態様に係る制御装置は、前記の構成において、前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、前記プログラムツリーには、前記第2駆動装置を制御するためのサンプルプログラムが含まれており、ユーザが前記サンプルプログラムを選択すると、前記編集部は、選択された該サンプルプログラムを前記第2プログラムとして使用可能とする構成である。
 前記の構成によれば、ユーザは、第1プログラムと、第2プログラムとの処理の流れを同一の編集ウィンドウで一度に確認することができる。また、ユーザは、当該編集ウィンドウにおいて、直観的な操作で、第1プログラムと、第1プログラムから呼び出される第2プログラムとを、作成または編集することができる。また、当該編集ウィンドウには、ユーザによって編集可能なサンプルプログラムが提供されるため、ユーザは、容易にユーザ定義のプログラムを作成することができる。
 また、本発明の一態様に係る制御装置は、前記の構成において、ユーザが、前記第1プログラムにおける位置を指定し、かつ、前記サンプルプログラムを選択すると、前記編集部は、前記第1プログラムにおける指定された位置から、選択された前記サンプルプログラムを呼び出すよう設定し、かつ、選択された前記サンプルプログラムのコードを編集可能にする構成である。
 前記の構成によれば、ユーザは、直観的な操作で、第1プログラムと、第1プログラムから呼び出す第2プログラムとを定義することができ、かつ、第1プログラムと、第2プログラムとを同期させることができる。また、ユーザは、編集したい位置を選択するという簡単な操作で、選択したサンプルプログラムのコードを編集することができる。
 また、本発明の一態様に係る制御装置は、前記の構成において、前記第2実行部は、前記第2プログラムの実行中に、前記第2プログラムの中のいずれの命令文を実行しているかを表示させる構成である。
 前記の構成によれば、ユーザは、第2プログラムの実行中に、いずれの命令文が実行されているのかを表示されている情報から確認することができる。よって、ユーザは定義した命令文により、制御アプリケーションが意図した動作を行っているのかを容易に確認することができ、適宜に命令文の作成または編集を行うことができる。
 また、本発明の一態様に係る制御装置は、前記の構成において、前記プログラム管理部は、前記第1プログラムを実行形式に変換し、前記第2プログラムを複数の中間コードに変換し、前記第2実行部は、前記複数の命令文に対応する前記複数の中間コードを逐次実行する構成である。
 前記の構成によれば、プログラムのビルド時に、第1プログラムは実行形式に変換され、第2プログラムは複数の中間コードに変換される。プログラムの実行時に中間コードに変換する方式では、プログラム実行時に第2プログラムを解読し、中間コードを生成し、中間コードを一旦キューイングして実行するため、処理に遅延が生じる。本実施形態によれば、プログラム実行時に中間コードへの変換が必要ないので、高速にアプリケーションプログラムを実行することができる。
 また、本発明の一態様に係る制御装置は、前記の構成において、前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、前記プログラムツリーは、前記第1プログラムと、前記第1プログラムから呼び出される前記第2プログラムとを含み、前記編集部は、前記編集ウィンドウにおいて、前記第1プログラムから呼び出される前記第2プログラムを、前記第1プログラムの中のブロックとして表示し、ユーザが、前記第2プログラムを示すブロックまたは前記第2プログラムを示すタブを選択すると、前記編集部は、前記第2エリアに前記第2プログラムのソースコードを表示させる構成である。
 前記の構成によれば、ユーザは、直観的な操作で、第1プログラムと、第1プログラムから呼び出す第2プログラムとを定義することができ、かつ、第1プログラムと、第2プログラムとを同期させて、プログラムを作成または編集することができる。また、ユーザは、編集したいプログラムを示すブロックまたはタブを選択するという簡単な操作で、選択したサンプルプログラムのコードを編集することができる。
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
30 シーケンスプログラム(第1プログラム、PLCプログラム)
32 アプリケーションプログラム(第2プログラム)
34 中間コード
100 統合コントローラ
146 タッチパネル
150 IECプログラム処理部(第1実行部)
154 編集部
156 プログラム管理部
158 入力部
159 表示部
160 制御アプリケーション処理部(第2実行部)
161 第1制御アプリケーション処理部(第2実行部)
162 第2制御アプリケーション処理部(第2実行部)
500 フィールド機器(制御アプリケーション)
520 ロボット
530 工作機械
540 サーボドライバ
601、602 編集ウィンドウ
611 第1エリア
612 第2エリア
613a、613b、613c タブ
621、622、631、632 ブロック

Claims (6)

  1.  実行毎に全体がスキャンされる第1プログラムと、前記第1プログラムから呼び出され逐次実行される第2プログラムとを、並行して1つの開発環境で編集可能な開発ツールを提供する編集部と、
     前記第1プログラムと、前記第2プログラムとを一括でビルドするプログラム管理部と、
     所定の制御周期毎に前記第1プログラムを実行することで、該制御周期毎に第1駆動装置を制御する指令を生成する第1実行部と、
     前記第2プログラムに含まれる複数の命令文を逐次実行することで、第2駆動装置を制御する指令を逐次生成する第2実行部とを備える、制御装置。
  2.  前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、
     前記プログラムツリーには、前記第2駆動装置を制御するためのサンプルプログラムが含まれており、
     ユーザが前記サンプルプログラムを選択すると、前記編集部は、選択された該サンプルプログラムを前記第2プログラムとして使用可能とする、請求項1に記載の制御装置。
  3.  ユーザが、前記第1プログラムにおける位置を指定し、かつ、前記サンプルプログラムを選択すると、前記編集部は、前記第1プログラムにおける指定された位置から、選択された前記サンプルプログラムを呼び出すよう設定し、かつ、選択された前記サンプルプログラムのコードを編集可能にする、請求項2に記載の制御装置。
  4.  前記第2実行部は、前記第2プログラムの実行中に、前記第2プログラムの中のいずれの命令文を実行しているかを表示させる、請求項1から3のいずれか一項に記載の制御装置。
  5.  前記プログラム管理部は、
      前記第1プログラムを実行形式に変換し、
      前記第2プログラムを複数の中間コードに変換し、
     前記第2実行部は、前記複数の命令文に対応する前記複数の中間コードを逐次実行する、請求項1から4のいずれか一項に記載の制御装置。
  6.  前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、
     前記プログラムツリーは、前記第1プログラムと、前記第1プログラムから呼び出される前記第2プログラムとを含み、
     前記編集部は、前記編集ウィンドウにおいて、前記第1プログラムから呼び出される前記第2プログラムを、前記第1プログラムの中のブロックとして表示し、
     ユーザが、前記第2プログラムを示すブロックまたは前記第2プログラムを示すタブを選択すると、前記編集部は、前記第2エリアに前記第2プログラムのソースコードを表示させる、請求項1に記載の制御装置。
PCT/JP2019/024145 2018-07-30 2019-06-18 制御装置 WO2020026622A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018142297A JP7077848B2 (ja) 2018-07-30 2018-07-30 制御装置
JP2018-142297 2018-07-30

Publications (1)

Publication Number Publication Date
WO2020026622A1 true WO2020026622A1 (ja) 2020-02-06

Family

ID=69231611

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/024145 WO2020026622A1 (ja) 2018-07-30 2019-06-18 制御装置

Country Status (2)

Country Link
JP (1) JP7077848B2 (ja)
WO (1) WO2020026622A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2022034848A1 (ja) * 2020-08-11 2022-02-17

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021142625A (ja) * 2020-03-13 2021-09-24 オムロン株式会社 ロボット制御システムおよび制御方法
WO2022244269A1 (ja) * 2021-05-21 2022-11-24 日本電信電話株式会社 計算機装置のための制御装置
JP7662131B2 (ja) * 2023-09-08 2025-04-15 株式会社Preferred Robotics 生成装置、ロボット、生成方法及びプログラム

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0772920A (ja) * 1993-09-03 1995-03-17 Hitachi Ltd Faシステムの制御方法及び装置
JPH0938876A (ja) * 1995-08-01 1997-02-10 Ricoh Co Ltd シミュレーション装置
JPH09171405A (ja) * 1995-12-20 1997-06-30 Hitachi Ltd Faシステムの制御装置と方法、制御プログラム生成方法
JP2001282331A (ja) * 2000-03-30 2001-10-12 Toyoda Mach Works Ltd 工作機械シミュレーション装置
JP2009104227A (ja) * 2007-10-19 2009-05-14 Omron Corp Plc制御プログラム開発装置及びプログラム
JP2014241018A (ja) * 2013-06-11 2014-12-25 ファナック株式会社 工作機械とロボットを制御する制御装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6549378B2 (ja) * 2015-01-09 2019-07-24 株式会社ジェイテクト プログラマブルコントローラのモニタ装置
JP6550268B2 (ja) * 2015-05-27 2019-07-24 株式会社キーエンス プログラム作成支援装置、プログラムおよび判別方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0772920A (ja) * 1993-09-03 1995-03-17 Hitachi Ltd Faシステムの制御方法及び装置
JPH0938876A (ja) * 1995-08-01 1997-02-10 Ricoh Co Ltd シミュレーション装置
JPH09171405A (ja) * 1995-12-20 1997-06-30 Hitachi Ltd Faシステムの制御装置と方法、制御プログラム生成方法
JP2001282331A (ja) * 2000-03-30 2001-10-12 Toyoda Mach Works Ltd 工作機械シミュレーション装置
JP2009104227A (ja) * 2007-10-19 2009-05-14 Omron Corp Plc制御プログラム開発装置及びプログラム
JP2014241018A (ja) * 2013-06-11 2014-12-25 ファナック株式会社 工作機械とロボットを制御する制御装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2022034848A1 (ja) * 2020-08-11 2022-02-17
WO2022034848A1 (ja) * 2020-08-11 2022-02-17 ファナック株式会社 数値制御システム及びロボット制御方法
JP7564217B2 (ja) 2020-08-11 2024-10-08 ファナック株式会社 数値制御システム及びロボット制御方法

Also Published As

Publication number Publication date
JP2020021124A (ja) 2020-02-06
JP7077848B2 (ja) 2022-05-31

Similar Documents

Publication Publication Date Title
CN109388107B (zh) 控制装置
WO2020026622A1 (ja) 制御装置
US10761515B2 (en) Control system for controlling control object and control device for linking control applications in control system
US10761884B2 (en) Control device for operating multiple types of programs in different execution formats
US20190095246A1 (en) Support device and non-transitory storage medium
JP6950385B2 (ja) 制御装置および制御方法
JP6900863B2 (ja) 制御装置、制御方法および制御プログラム
JP7310465B2 (ja) 同期制御装置、同期制御システム、同期制御方法、及びシミュレーション装置
JP2019053459A (ja) 制御装置および制御方法
JP2021026309A (ja) 制御システム、解析方法およびプログラム
CN109491324B (zh) 控制装置及控制方法
US12117788B2 (en) Control device with second processing unit that accesses variable via first processing unit
JP2007068292A (ja) Plc機能内蔵型ドライブ制御装置
JP7375632B2 (ja) 制御システムおよびサポート装置
JP7396063B2 (ja) データ処理方法
WO2022254927A1 (ja) 情報処理装置、制御システム、および制御プログラムを開発するプログラム
JP7593154B2 (ja) 制御装置、制御方法および制御プログラム
WO2022249713A1 (ja) 制御システム、システムプログラムおよびデバッグ方法
WO2020137522A1 (ja) 同期制御装置、同期制御システム、同期制御方法、及びシミュレーション装置

Legal Events

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

Ref document number: 19845439

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: 19845439

Country of ref document: EP

Kind code of ref document: A1