JP2020021124A - Controller - Google Patents

Controller Download PDF

Info

Publication number
JP2020021124A
JP2020021124A JP2018142297A JP2018142297A JP2020021124A JP 2020021124 A JP2020021124 A JP 2020021124A JP 2018142297 A JP2018142297 A JP 2018142297A JP 2018142297 A JP2018142297 A JP 2018142297A JP 2020021124 A JP2020021124 A JP 2020021124A
Authority
JP
Japan
Prior art keywords
program
editing
unit
control
application
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2018142297A
Other languages
Japanese (ja)
Other versions
JP7077848B2 (en
Inventor
純児 島村
Junji Shimamura
純児 島村
佳代子 磯谷
Kayoko Isogai
佳代子 磯谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2018142297A priority Critical patent/JP7077848B2/en
Priority to PCT/JP2019/024145 priority patent/WO2020026622A1/en
Publication of JP2020021124A publication Critical patent/JP2020021124A/en
Application granted granted Critical
Publication of JP7077848B2 publication Critical patent/JP7077848B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

To provide a technology which can collectively create a PLC program, and one or more application programs called from the PLC program.SOLUTION: An integrated controller 100 comprises: an editorial unit 154 which provides a development tool which can edit a first program and a second program in one development environment; a program management unit 156 which collectively builds the first program and the second program; a first execution unit 150 which executes the first program at predetermined control periods; and a second execution unit 160 which sequentially executes a plurality of commands contained in the second program.SELECTED DRAWING: Figure 3

Description

本発明は、制御対象の制御を実行する制御装置に関する。   The present invention relates to a control device that executes control of a control target.

従来、製造現場において用いられる工作機械やロボットなどの複数の制御アプリケーション同士がどのように連携するかの使用を決定し、その使用を実現するためのラダープログラムが工作機械メーカにより提供されている。これらのラダープログラムは、ユーザによる編集ができず、ユーザが機能の追加を望む場合には、ラダープログラムの改造を工作機械メーカに依頼する必要があった。また、制御アプリケーション毎にプログラムが独立しており、制御アプリケーション同士が連携動作を行うような場合には、それぞれのプログラムから、各制御アプリケーションがどのような動作を理解する必要があった。   2. Description of the Related Art Conventionally, 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. Further, 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.

そこで、制御アプリケーション同士の連携動作を、ユーザが加工プログラムで決定することができるように技術が提供されている(例えば、特許文献1参照)。特許文献1に記載の技術では、工作機械用命令文と、ロボット用命令文とを含む加工プログラムをユーザが工作機械と、ロボットとを制御する制御装置に入力可能である。そして、制御装置は、加工プログラムに含まれている工作機械用命令文を工作機械制御手段に転送し、ロボット用命令文をロボット制御手段へ転送する。これにより、工作機械とロボットとを連携するためのラダープログラムを必要とせず、工作機械とロボットとをユーザ定義の加工プログラムにより連携可能としている。   Therefore, a technique has been provided so that a user can determine a cooperative operation between control applications by a machining program (for example, see Patent Document 1). According to the technology described in 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. Then, 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. Thus, 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.

特開2014−241018号公報(2014年12月25日公開)JP 2014-241018 A (released on December 25, 2014)

ところで、生産現場においてPLC(Programmable Logic Controller)により、生産全体が監視および管理されている場合には、PLCプログラムと、NCプログラムやロボットプログラム等のアプリケーションプログラムとの両方に制御信号のやり取りに関する記述を行う必要がある。しかしながら、PLCプログラム、NCプログラム、ロボットプログラムのそれぞれは、異なる言語により記述されている。また、PLCプログラムと、アプリケーションプログラムとでは制御周期が異なる。   By the way, when the whole production is monitored and managed by a PLC (Programmable Logic Controller) at a production site, a description on exchange of control signals is written in both the PLC program and application programs such as an NC program and a robot program. There is a need to do. However, each of the PLC program, NC program, and robot program is described in a different language. The control cycle differs between the PLC program and the application program.

このため、PLCにより生産全体を監視および管理し、生産ラインと各制御アプリケーションとのタイミングを合わせるための、PLCプログラム、およびアプリケーションプログラムとは、上述のような従来技術では、纏めて作成することはできなかった。   For this reason, the PLC program and the application program for monitoring and managing the entire production by the PLC and matching the timing between the production line and each control application are not collectively created in the above-described conventional technology. could not.

本発明の一態様は、上述した事情に鑑みてなされたものであり、PLCプログラムと、PLCプログラムから呼び出される1又は複数のアプリケーションプログラムとを纏めて作成することができる技術を実現することを目的とする。   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. And

前記の課題を解決するために、本発明の一態様に係る制御装置は、実行毎に全体がスキャンされる第1プログラムと、前記第1プログラムから呼び出され逐次実行される第2プログラムとを、並行して1つの開発環境で編集可能な開発ツールを提供する編集部と、前記第1プログラムと、前記第2プログラムとを一括でビルドするプログラム管理部と、所定の制御周期毎に前記第1プログラムを実行することで、該制御周期毎に第1駆動装置を制御する指令を生成する第1実行部と、前記第2プログラムに含まれる複数の命令文を逐次実行することで、第2駆動装置を制御する指令を逐次生成する第2実行部とを備える構成である。   In order to solve the above-described problem, a control device according to an aspect of the present invention 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.

前記の構成によれば、第1プログラム(PLCプログラム)と、第1プログラムから呼び出される第2プログラムとを、を同一の開発環境において纏めて作成または編集し、ビルドすることができる。これにより、ユーザは、各々異なる言語で記述され、かつ、各々異なるスケジューリング方式で実行される第1プログラムと、第2プログラムとを同一の開発環境において簡単に作成または編集することができる。よって、例えば、制御周期が異なる、生産ラインを制御するための第1プログラムと、複数の制御対象(制御アプリケーション)のそれぞれを制御するための複数のアプリケーションプログラムとを、容易に作成または編集して、ユーザ定義のプログラムによって同期制御させることができる。   According to the configuration, 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 can be built. Thus, 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.

また、本発明の一態様に係る制御装置は、前記の構成において、前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、前記プログラムツリーには、前記第2駆動装置を制御するためのサンプルプログラムが含まれており、ユーザが前記サンプルプログラムを選択すると、前記編集部は、選択された該サンプルプログラムを前記第2プログラムとして使用可能とする構成である。   Further, in the control device according to one aspect of the present invention, in the above-described configuration, 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. Providing an editing window including a second area, wherein the program tree includes a sample program for controlling the second driving device, and when the user selects the sample program, the editing unit includes: The selected sample program can be used as the second program.

前記の構成によれば、ユーザは、第1プログラムと、第2プログラムとの処理の流れを同一の編集ウィンドウで一度に確認することができる。また、ユーザは、当該編集ウィンドウにおいて、直観的な操作で、第1プログラムと、第1プログラムから呼び出される第2プログラムとを、作成または編集することができる。また、当該編集ウィンドウには、ユーザによって編集可能なサンプルプログラムが提供されるため、ユーザは、容易にユーザ定義のプログラムを作成することができる。   According to the above configuration, the user can check 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.

また、本発明の一態様に係る制御装置は、前記の構成において、ユーザが、前記第1プログラムにおける位置を指定し、かつ、前記サンプルプログラムを選択すると、前記編集部は、前記第1プログラムにおける指定された位置から、選択された前記サンプルプログラムを呼び出すよう設定し、かつ、選択された前記サンプルプログラムのコードを編集可能にする構成である。   Further, in the control device according to one aspect of the present invention, in the above-described configuration, 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.

前記の構成によれば、ユーザは、直観的な操作で、第1プログラムと、第1プログラムから呼び出す第2プログラムとを定義することができ、かつ、第1プログラムと、第2プログラムとを同期させることができる。また、ユーザは、編集したい位置を選択するという簡単な操作で、選択したサンプルプログラムのコードを編集することができる。   According to the configuration, 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.

また、本発明の一態様に係る制御装置は、前記の構成において、前記第2実行部は、前記第2プログラムの実行中に、前記第2プログラムの中のいずれの命令文を実行しているかを表示させる構成である。   Further, in the control device according to an aspect of the present invention, in the above-described configuration, the second execution unit may execute any one of the command statements in the second program during execution of the second program. Is displayed.

前記の構成によれば、ユーザは、第2プログラムの実行中に、いずれの命令文が実行されているのかを表示されている情報から確認することができる。よって、ユーザは定義した命令文により、制御アプリケーションが意図した動作を行っているのかを容易に確認することができ、適宜に命令文の作成または編集を行うことができる。   According to the configuration, the user can confirm which command is being executed from the displayed information during execution of the second program. 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.

また、本発明の一態様に係る制御装置は、前記の構成において、前記プログラム管理部は、前記第1プログラムを実行形式に変換し、前記第2プログラムを複数の中間コードに変換し、前記第2実行部は、前記複数の命令文に対応する前記複数の中間コードを逐次実行する構成である。   Further, in the control device according to one aspect of the present invention, in the above configuration, 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.

前記の構成によれば、プログラムのビルド時に、第1プログラムは実行形式に変換され、第2プログラムは複数の中間コードに変換される。プログラムの実行時に中間コードに変換する方式では、プログラム実行時に第2プログラムを解読し、中間コードを生成し、中間コードを一旦キューイングして実行するため、処理に遅延が生じる。本実施形態によれば、プログラム実行時に中間コードへの変換が必要ないので、高速にアプリケーションプログラムを実行することができる。   According to the configuration, at the time of building the program, the first program is converted into an executable format, and the second program is converted into a plurality of intermediate codes. In the method of converting the second program into the intermediate code at the time of executing the program, 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. According to the present embodiment, 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.

また、本発明の一態様に係る制御装置は、前記の構成において、前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、前記プログラムツリーは、前記第1プログラムと、前記第1プログラムから呼び出される前記第2プログラムとを含み、前記編集部は、前記編集ウィンドウにおいて、前記第1プログラムから呼び出される前記第2プログラムを、前記第1プログラムの中のブロックとして表示し、ユーザが、前記第2プログラムを示すブロックまたは前記第2プログラムを示すタブを選択すると、前記編集部は、前記第2エリアに前記第2プログラムのソースコードを表示させる構成である。   Further, in the control device according to one aspect of the present invention, in the above-described configuration, 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. Providing an editing window including a second area, wherein the program tree includes the first program and the second program called from the first program, and wherein the editing unit includes: The second program called from one program is displayed as a block in the first program, and when the user selects a block indicating the second program or a tab indicating the second program, the editing unit includes: The source code of the second program is displayed in the second area.

前記の構成によれば、ユーザは、直観的な操作で、第1プログラムと、第1プログラムから呼び出す第2プログラムとを定義することができ、かつ、第1プログラムと、第2プログラムとを同期させて、プログラムを作成または編集することができる。また、ユーザは、編集したいプログラムを示すブロックまたはタブを選択するという簡単な操作で、選択したサンプルプログラムのコードを編集することができる。   According to the configuration, 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.

本発明の一態様によれば、PLCプログラムと、PLCプログラムから呼び出される1又は複数のアプリケーションプログラムとを纏めて作成することができる。   According to one embodiment of the present invention, a PLC program and one or a plurality of application programs called from the PLC program can be created together.

本発明の実施形態1に係る統合コントローラが使用されるシステム環境の概要を示す図である。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.

以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。   Hereinafter, an embodiment according to one aspect of the present invention (hereinafter, also referred to as “the present embodiment”) will be described with reference to the drawings.

§1 適用例
図1を用いて、本発明が適用される場面の一例について説明する。図1は、本実施形態に係る制御装置の一例である統合コントローラ100が使用されるシステム環境の概要を示す図である。統合コントローラ100は、モーションネットワークケーブル2を介してロボット520や工作機械530等の制御対象に接続されている。また、統合コントローラ100は、イーサネット(登録商標)等によるネットワーク6を介してサーバ装置300に接続されている。
§1 Application Example An example of a scene to which the present invention is applied will be described with reference to FIG. 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).

統合コントローラ100は、ロボット520や工作機械530等の制御対象を統括的に制御する装置である。また、統合コントローラ100は、各種センサ入力に応じて、ベルトコンベア544のサーボモータ542を駆動するサーボドライバ540を制御するPLC(Programmable Logic Controller)としても機能する。   The integrated controller 100 is a device that totally 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 in accordance with various sensor inputs.

統合コントローラ100は、PLCプログラムと、ロボット520や工作機械530等の制御アプリケーションのそれぞれを制御するためのアプリケーションプログラムとを統合的に実装した装置である。統合コントローラ100は、制御対象に応じたプログラムを実行し、これらの制御対象を制御することで、生産ラインと各制御アプリケーションとを同期制御する。   The integrated controller 100 is a device 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.

PLCプログラムは、ラダー言語により記述されたプログラムであり、実行毎に全体がスキャンされる。PLCプログラムは、例えば、国際電気標準会議(International Electrotechnical Commission:IEC)によって規定された国際規格IEC61131−3に従って記述されている。   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).

ロボット520を制御するためのロボットプログラムは、一般的に体系化された所謂ロボット用言語により記述されている。   A robot program for controlling the robot 520 is generally described in a systematic so-called robot language.

工作機械530を制御するためのNCプログラムは、一般的にISOによって規格化されたG−コードにより記述されている。   An NC program for controlling the machine tool 530 is generally described by G-code standardized by ISO.

統合コントローラ100によって実行されるこれらのプログラムのそれぞれは、ユーザによって作成、または編集可能である。統合コントローラ100は、PLCプログラム、およびアプリケーションプログラムを1つの開発環境で編集可能とする開発ツールをユーザに提供する。また、統合コントローラ100は、PLCプログラムと、アプリケーションプログラムとを、一括でビルドし、管理する。   Each of these programs executed by the integrated controller 100 can be created or edited by a user. 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.

このように、統合コントローラ100は、生産ラインと各制御アプリケーションとを同期制御するとともに、各制御対象に応じたプログラムを1つの開発環境で編集可能とする開発ツールをユーザに提供する。これによりユーザは、PLCプログラムと、PLCプログラムから呼び出される、ロボット520や工作機械530等の制御アプリケーションのアプリケーションプログラムとを纏めて作成することができる。   As described above, the integrated controller 100 provides the user with a development tool that controls the production line and each control application in synchronization with each other 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.

§2 構成例
〔統合コントローラ100の構成について〕
図1、図2、および図3に基づいて、本発明の実施形態に係る統合コントローラ100の構成について詳細に説明する。図1は、統合コントローラ100が使用されるシステム環境の概要を示す図である。図2は、統合コントローラ100の要部構成を示すブロック図である。図3は、統合コントローラ100の機能構成の一例を示す模式図である。
§2 Configuration example [About configuration of integrated controller 100]
The configuration of the integrated controller 100 according to the embodiment of the present invention will be described in detail with reference to FIG. 1, FIG. 2, and FIG. 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.

統合コントローラ100は、産業用コントローラであり、制御対象の装置を制御する。統合コントローラ100は、モーションネットワークケーブル2を介して1または複数のフィールド機器500と接続されフィールド機器500との間でデータを遣り取りする。   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.

また、統合コントローラ100は、タッチパネル146を備える。タッチパネル146は、統合コントローラ100に対するユーザ操作を受け付ける入力部として機能するとともに、統合コントローラ100による演算結果を表示する表示部として機能する。   Further, the integrated controller 100 includes a 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.

モーションネットワークケーブル2は、データの到達時間が保証される、定周期通信を行うバスまたはネットワークを採用することが好ましい。このような定周期通信を行うバスまたはネットワークとしては、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などが知られている。   It is preferable that 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), and the like are known as buses or networks that perform such periodic communication.

フィールド機器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上に配置する。   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.

なお、統合コントローラ100は、数100μsecオーダ〜数10msecオーダのごく短い周期でフィールド機器500との間でデータを遣り取りし、フィールド機器500に対する制御指令などのデータを送信する。   The integrated controller 100 exchanges data with the field device 500 at a very short period of the order of several 100 μsec to several tens of msec, and transmits data such as a control command to the field device 500.

また、統合コントローラ100は、ネットワーク6を介して、サーバ装置300や、1または複数の表示装置400に接続されている。ネットワーク6には、一般的なネットワークプロトコルであるイーサネット(登録商標)やEtherNet/IP(登録商標)が採用されてもよい。   Further, the integrated controller 100 is connected to the server device 300 and one or a plurality of 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).

サーバ装置300は、データベースシステムや、製造実行システム(MES:Manu
facturing Execution System)などである。サーバ装置300は、フィールド機器500のそれぞれから情報を取得して、生産全体を監視および管理する機能を有していてもよく、オーダ情報、品質情報、出荷情報などを扱うこともできる。
The server device 300 includes a database system and a manufacturing execution system (MES: Manu).
facturing Execution System). 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.

表示装置400は、統合コントローラ100に対するユーザ操作に応じた内容を表示する。また、表示装置400は、統合コントローラ100による演算結果等をグラフィカルに表示する。   The display device 400 displays contents corresponding to a user operation on the integrated controller 100. In addition, the display device 400 graphically displays a calculation result or the like by the integrated controller 100.

〔統合コントローラ100のハードウェア構成例〕
図2は、統合コントローラ100のハードウェア構成例を示すブロック図である。図2に示すように、統合コントローラ100は、プロセッサ102、チップセット104、主メモリ106、およびストレージ108を備えている。また、統合コントローラ100は、上位ネットワークコントローラ110、メモリカードインタフェース114、内部バスコントローラ120、およびフィールドネットワークコントローラ130を含んでいる。また、統合コントローラ100は、タッチパネル146を備えている。
[Example of hardware configuration of integrated controller 100]
FIG. 2 is a block diagram illustrating a hardware configuration example of the integrated controller 100. As shown in FIG. 2, 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.

プロセッサ102は、CPUユニットと称される演算処理部であり、図示は省略するが、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、GPU(Graphics Processing Unit)などで構成されている。プロセッサ102としては、複数のコアを有する構成を採用してもよいし、プロセッサ102を複数配置してもよい。すなわち、統合コントローラ100は、1または複数のプロセッサ102、および/または、1または複数のコアを有するプロセッサ102を有している。プロセッサ102は、ストレージ108に格納された各種プログラムを読出して、主メモリ106に展開して実行することで、制御対象に応じた制御、および、後述するような各種処理を実現する。   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), and the like, although not shown. As the processor 102, 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.

チップセット104は、プロセッサ102およびその周辺エレメントを制御することで、統合コントローラ100全体としての処理を実現する。   The chipset 104 controls the processor 102 and its peripheral elements to realize processing of the integrated controller 100 as a whole.

主メモリ106は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成されている。   The main memory 106 includes a volatile storage device such as a DRAM (Dynamic Random Access Memory) and an SRAM (Static Random Access Memory).

ストレージ108は、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)などの不揮発性記憶装置で構成されている。ストレージ108には、統合コントローラ100が基本的な機能を実現するためのシステムプログラム34が格納されている。また、ストレージ108には、統合コントローラ100の制御対象の装置に応じて作成されるシーケンスプログラム30、および1または複数のアプリケーションプログラム32が格納されている。   The storage 108 is configured by a nonvolatile 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.

シーケンスプログラム30は、PLCプログラムであり、一定の制御周期毎に実行される。また、シーケンスプログラム30は、実行毎に全体がスキャンされる。シーケンスプログラム30を実行することで、統合コントローラ100は、センサ入力に応じ駆動装置(サーボモータ)を制御する等の、対象装置の状態やセンサ等の信号に基づいたシーケンス制御を行う。   The sequence program 30 is a PLC program, and is executed at a constant control cycle. The entire sequence program 30 is scanned every time it is executed. By executing the sequence program 30, 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.

アプリケーションプログラム32は、ロボット520や工作機械530等の制御アプリケーションを制御するプログラムであり、ロボット520を制御するためのロボットプログラムや、工作機械530を制御するためのNCプログラムである。アプリケーションプログラム32は、シーケンスプログラム30から呼び出されて逐次実行される。以下の説明において、シーケンスプログラム30を第1のプログラム、アプリケーションプログラム32を第2のプログラムとも称する。   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. In the following description, the sequence program 30 is also called a first program, and the application program 32 is also called a second program.

上位ネットワークコントローラ110は、上位ネットワーク6を介して、サーバ装置300や表示装置400などとの間のデータの遣り取りを制御する。   The upper network controller 110 controls data exchange with the server device 300 and the display device 400 via the upper network 6.

メモリカードインタフェース114は、メモリカード116が着脱可能に構成されており、メモリカード116に対してデータを書込み、メモリカード116から各種データを読出すことが可能になっている。   The memory card interface 114 is configured such that a 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.

内部バスコントローラ120は、統合コントローラ100に装着されるI/Oユニット122との間のデータの遣り取りを制御する。   The internal bus controller 120 controls data exchange with the I / O unit 122 mounted on the integrated controller 100.

フィールドネットワークコントローラ130は、モーションネットワークケーブル2を介して接続されたフィールドデバイスとの間のデータの遣り取りを制御する。   The field network controller 130 controls data exchange with a field device connected via the motion network cable 2.

なお、プロセッサ102がプログラムを実行することで必要な機能を提供する構成に限らず、提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。また、統合コントローラ100の主要部を、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。   Note that 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. Further, 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 purposes may be executed in parallel using virtualization technology, and a required application may be executed on each OS.

タッチパネル146は、統合コントローラ100の入出力部として機能する。   The touch panel 146 functions as an input / output unit of the integrated controller 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実行部とも称する。
[Functional configuration of integrated controller 100]
FIG. 3 is a schematic diagram illustrating an example of a functional configuration of the integrated controller 100. As shown in FIG. 3, 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 ”). The IEC program processing unit 150 is also called a first execution unit, and the control application processing unit 160 is also called a second execution unit.

編集部154は、統合コントローラ100で実行されるシーケンスプログラム30、およびアプリケーションプログラム32とを、並行して1つの開発環境で作成または編集可能な開発ツールを提供する。編集部154によって作成または編集されたシーケンスプログラム30、およびアプリケーションプログラム32は、ストレージ108に格納される。また、編集部154は、統合コントローラ100に接続される各種デバイスのパラメータ(コンフィギュレーション)を設定するための設定環境を提供してもよい。   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.

プログラム管理部156は、編集部154によって作成または編集されたシーケンスプログラム30と、アプリケーションプログラム32とを、一括してコンパイルし、リンクすることで、ビルドする。   The program management unit 156 builds the sequence program 30 created or edited by the editing unit 154 and the application program 32 by collectively compiling and linking.

プログラム管理部156は、シーケンスプログラム30と、アプリケーションプログラム32とを、一括してビルドすることで、シーケンスプログラム30を実行形式に変換し、アプリケーションプログラム32を複数の中間コードに変換する。このように、プログラム管理部156は、シーケンスプログラム30と、アプリケーションプログラム32とを、一括してビルドするとともに、アプリケーションプログラム32を、実行前に予め、中間コードに変換する。   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.

プログラム管理部156は、ビルドされたシーケンスプログラム30、アプリケーションプログラム32、および中間コードを、ストレージ108に格納する。なお、中間コードは、制御周期毎に指令値を演算するための命令を包含する概念であり、1または複数の命令、あるいは、1または複数の関数を含む。   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.

入力部158は、ユーザ操作の入力を受けつける。表示部159は、入力部158に対するユーザ操作に応じた画面を表示する。なお、本実施形態では、図1に示したタッチパネル146が、入力部158と、表示部159との機能を兼ねている。詳細については後述するが、ユーザは、タッチパネル146への操作によって、編集部154によるシーケンスプログラム30、およびアプリケーションプログラム32の編集を実行することが出来る。   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. In the present embodiment, the touch panel 146 shown in FIG. 1 also functions as the input unit 158 and the display unit 159. Although details will be described later, the user can edit the sequence program 30 and the application program 32 by the editing unit 154 by operating the touch panel 146.

IECプログラム処理部150は、予め定められた所定の制御周期毎にシーケンスプログラム30を実行(スキャン)することで、シーケンスプログラム30に含まれるモーション命令に従って、当該制御周期毎に、PLCプログラムにより制御されるサーボドライバ540などの駆動装置(第1駆動装置)を制御する1または複数の指令を生成し、出力する。IECプログラム処理部150は、シーケンスプログラム30に含まれる各入力条件(センサー入力値等)が成立しているか否かを所定の制御周期毎(例えば、1μ秒毎)に判定する。IECプログラム処理部150から出力された指令は、主メモリ106に格納される。   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.

制御アプリケーション処理部160は、シーケンスプログラム30から呼び出されたアプリケーションプログラム32に含まれる複数の命令文の各行を逐次実行することで、ロボット520や工作機械530などの制御アプリケーション(第2駆動装置)を制御する指令を逐次生成する。IECプログラム処理部150は、シーケンスプログラム30に含まれる入力条件が成立している場合に、該入力条件に対応するアプリケーションプログラム32を呼び出す。   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.

つまり、制御アプリケーション処理部160は、IECプログラム処理部150による演算処理と同期して、指令値の演算処理を実行する。制御アプリケーション処理部160は、ストレージ108に予め格納されている中間コード35に従って、指令を生成し、生成した指令を主メモリ106に対して出力する。   That is, the 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.

IECプログラム処理部150は、主メモリ106に格納された制御アプリケーション処理部160による処理結果を参照することができる。   The IEC program processing unit 150 can refer to the processing result by the control application processing unit 160 stored in the main memory 106.

フィールドネットワークインタフェース180は、IECプログラム処理部150により生成された1または複数の指令(基本的には、論理値)と、制御アプリケーション処理部160により生成された1または複数の指令(基本的には、数値)とを制御周期毎にフィールド機器500へ出力する。   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.

〔編集部のユーザインタフェースについて〕
図4は、編集部154が提供する、シーケンスプログラム30と、アプリケーションプログラム32とを編集する開発ツールのユーザインタフェースの一例である編集ウィンドウ601を示す図である。編集ウィンドウ601は、表示部159の機能により、タッチパネル146に表示され、ユーザのタッチ位置に応じた入力が入力部158により検出される。
[About the user interface of the editorial department]
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.

図4に示すように、編集ウィンドウ601は、第1エリア611と、第2エリア612と、を含んでいる。第1エリア611には、プログラムツリーが表示される。第2エリア612には、プログラムツリーから選択されたプログラムのソースコードが表示される。また、第2エリア612には、プログラム編集エリア614に表示されたプログラムを編集するために用いるツールを含むツールボックス615が表示されている。ユーザはツールボックス615内のツールを例えば、ドラックアンドドロップによってプログラム編集エリア614に導入して、シーケンスプログラム30の作成または編集を行うことができる。   As shown in FIG. 4, the editing window 601 includes a first area 611 and a second area 612. In the first area 611, a program tree is displayed. In the second area 612, the source code of the program selected from the program tree is displayed. Further, 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. 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.

第1エリア611に表示されたプログラムツリーには、シーケンスプログラム30のロジック(例えばプログラムA,プログラムB)と、ロボット520や工作機械530等の第2駆動装置を制御するためのアプリケーションプログラム32(例えば、RC1,RC2,RC_Sample,NC1,NC2,NC_Sample)と、が含まれている。   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).

プログラムツリーに含まれているアプリケーションプログラム32のうち、RC1,RC2,NC1,NC2等は、ユーザにより作成されたプログラムである。また、プログラムツリーに含まれているアプリケーションプログラム32のうち、RC_SampleやNC_Sampleは、例えば統合コントローラ100のメーカにより予め用意されているサンプルプログラムである。サンプルプログラムのNC_Sampleは、例えば、ISOによって規格化されているGコードに基づいたソースコードである。   Among the application programs 32 included in the program tree, RC1, RC2, NC1, NC2, and the like 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.

ユーザが、第1エリア611においてプログラムツリーの中から、サンプルプログラムを選択すると、編集部154は、選択されたサンプルプログラムを、編集可能なアプリケーションプログラム32として使用可能とする。   When the user selects a sample program from the program tree in the first area 611, the editing unit 154 makes the selected sample program usable as the editable application program 32.

また、編集部154は、ユーザによってロジックが選択されると、選択されたロジックに応じたシーケンスプログラム30、およびアプリケーションプログラム32を第2エリア612のプログラム編集エリア614に表示する。図4は、ユーザが、第1エリア611においてPLCプログラムのプログラムAを選択した場合の例を示している。なお、第2エリア612には、各PLCプログラムA,B・・・が、タブ613a,613B・・・にそれぞれ表示され、タブ613a,613B・・を切り替えることで、プログラム編集エリア614に表示されるプログラムを切り替えることができてもよい。   When a logic is selected by the user, the editing unit 154 displays the sequence program 30 and the application program 32 according to the selected logic in the program editing area 614 of the second area 612. 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.

プログラム編集エリア614には、ラダー言語で記述された縦に長いシーケンスプログラム30の一連のロジック620と、ロジック620の各条件(X1,X2,・・・)が成立している場合に実行されるアプリケーションプログラム32の中身が記述されているプログラミングブロック621,622,・・・とが表示される。   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.

図4の例では、シーケンスプログラム30のX1の条件が成立している場合に実行されるプログラミングブロック621の中身は、Gコードで記述されたNCプログラムである。また、シーケンスプログラム30のX2の条件が成立している場合に実行されるプログラミングブロック622の中身は、ロボット言語で記述されたロボットプログラムである。   In the example of FIG. 4, 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.

このように、編集部154は、ラダー言語で記述されたPLCプログラムと、Gコードで記述されたNCプログラムと、ロボット言語で記述されたロボットプログラムとを、1つの開発環境で編集可能とする。すなわち、編集部154は、制御スケジュール、制御対象の装置、およびプログラミング言語が互いに異なる複数のプログラムを、1つの開発環境で編集可能とする。   As described above, the editing unit 154 enables 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.

具体例を説明すると、例えば、ユーザは、第1エリア611、または第2エリア612においてシーケンスプログラム30(ロジック)における編集位置を指定し、かつ、使用するサンプルプログラムを選択する。ユーザによって、シーケンスプログラム30における編集位置が指定され、かつ、使用するサンプルプログラムが選択されると、編集部154は、シーケンスプログラム30における指定された位置から、選択されたサンプルプログラムを呼び出すよう設定し、かつ、選択されたサンプルプログラムのコードを編集可能にプログラム編集エリア614に表示する。   To describe a specific example, for example, 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. When the editing position in the sequence program 30 is designated by the user and the sample program to be used is selected, the editing unit 154 sets to call the selected sample program from the designated position in the sequence program 30. Further, the code of the selected sample program is displayed in the program editing area 614 so as to be editable.

例えば、ユーザが、ロジックからプログラムAのX1の右側を編集位置として指定し、かつ、使用するサンプルプログラムとしてNC_Sampleを選択すると、プログラミングブロック621が設けられ、プログラミングブロック621の中にNC_Sampleのソースコードが展開される。プログラミングブロック621はソースコードを編集可能なサブウィンドウ(スクロールバー含む)としても機能する。   For example, when the user designates the right side of X1 of the program A as the editing position from the logic and selects NC_Sample as a sample program to be used, 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.

サンプルプログラムには、複数の命令文が含まれている。図4に示した例では、プログラムAにおいて、X1の条件が成立した場合には、G01X100Y100,G01X200Y100・・・の複数の命令文が逐次実行されるプログラムが示されている。また、プログラムAにおいて、X2の条件が成立した場合には、MOVEP1,MOVEP2・・・の複数の命令文が逐次実行されるプログラムが示されている。ユーザは、プログラム編集エリア614の各ブロック621,622内に表示された命令文を記述された言語を用いて編集することができる。
ユーザは、プログラム編集エリア614において編集した命令文を含むアプリケーションプログラムを新たなアプリケーションプログラムとして保存することもでき、既存のアプリケーションプログラムを上書きして保存することもできる。このように、ユーザによって定義されたプログラム、および、予め用意されたサンプルプログラムは、流用性が高いものであり、ユーザは、ユーザ定義のプログラムを容易に作成することができる。
The sample program includes a plurality of statements. In the example shown in FIG. 4, in the program A, when the condition of X1 is satisfied, a program in which a plurality of command statements G01X100Y100, G01X200Y100,... Also, in the program A, when the condition of X2 is satisfied, 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. As described above, the program defined by the user and the sample program prepared in advance have high diversion, and the user can easily create the user-defined program.

〔編集部のユーザインタフェースの変形例〕   [Modification of user interface of editorial department]

図5、および図6は、編集部154が提供する、ユーザインタフェースの別の例である編集ウィンドウ602を示す図である。図5に示すように、編集ウィンドウ602は、第1エリア611と、第2エリア612と、を含んでいる。第1エリア611には、プログラムツリーが表示される。第2エリア612には、プログラムツリーから選択されたプログラムのソースコードが表示される。   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. As shown in FIG. 5, the editing window 602 includes a first area 611 and a second area 612. In the first area 611, a program tree is displayed. In the second area 612, the source code of the program selected from the program tree is displayed.

第1エリア611に表示されたプログラムツリーには、シーケンスプログラム30のロジック(例えばプログラムA,プログラムB)と、シーケンスプログラム30から呼び出されるアプリケーションプログラム32(例えば、RC1,RC2,RC_Sample,NC1,NC2,NC_Sample)とを含んでいる。   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).

編集部154は、編集ウィンドウ602のプログラム編集エリア614に、ユーザによって選択されたシーケンスプログラム30の一連のロジック630を表示する。また編集部154は、プログラム編集エリア614に、シーケンスプログラム30から呼び出されるアプリケーションプログラム32を、シーケンスプログラム30の中のブロック631,632として表示する。また、編集部154は、プログラム編集エリア614に、ユーザによって選択されたシーケンスプログラム30と、当該シーケンスプログラム30から呼びされるアプリケーションプログラム32とのそれぞれに対応するタブ613a,613b,613cを表示する。編集部154は、プログラム編集エリア614に現在表示されているタブをハイライト表示することで、現在選択されているタブをユーザに明示することができてもよい。   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.

ユーザが、シーケンスプログラム30の中のブロックとして表示されたアプリケーションプログラム32、または当該アプリケーションプログラムを示すタブを選択すると、編集部154は、プログラム編集エリア614に選択されたアプリケーションプログラム32のソースコードを表示させる。   When the user selects the application program 32 displayed as a block in the sequence program 30 or a tab indicating the application program, the editing unit 154 displays the source code of the selected application program 32 in the program editing area 614. Let it.

図6は、ユーザが、ブロック631、またはタブ613bを選択した場合の編集ウィンドウ602の表示例を示している。図6に示すように、編集部154は、ユーザによって選択されたブロック631、またはタブ613bに応じたロボットプログラムであるRC1のソースコードを、編集可能にプログラム編集エリア614に表示する。ユーザは、プログラム編集エリア614に表示されたソースコードを記述された言語を用いて編集することができる。   FIG. 6 shows a display example of the edit window 602 when the user selects the block 631 or the tab 613b. As illustrated in FIG. 6, 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.

なお、編集部154は、プログラム編集エリア614において選択されているタブをハイライト表示するとともに、選択中のプログラムを、第1エリア611に表示されたプログラムツリーにおいてハイライト表示することができてもよい。   Note that the 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.

〔統合コントローラ100の処理フローについて〕
図7は、プログラムが作成または編集される場合の、統合コントローラ100の処理の流れを示すフローチャートである。ユーザによって、編集部154が提供する編集ウィンドウ601,602において、プログラムの作成が行われる(ステップS11)。ステップS11において、ユーザは、編集部154が提供する編集ウィンドウ601,602において、シーケンスプログラム30の作成または編集(ステップS11a)、および当該シーケンスプログラム30から呼び出されるアプリケーションプログラム32の作成または編集(ステップS11b)を、上述のように1つの開発環境において並行して行うことができる。
[Processing Flow of Integrated Controller 100]
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). In step S11, the user creates or edits the sequence program 30 in the editing windows 601 and 602 provided by the editing unit 154 (step S11a) and creates or edits the application program 32 called from the sequence program 30 (step S11b). ) Can be performed in parallel in one development environment as described above.

プログラム管理部156は、ユーザによってプログラムの作成や編集が行われると、作成または編集されたプログラムに応じた、シーケンスプログラム30と、当該シーケンスプログラムから呼び出されるアプリケーションプログラム32とを、一括して文法チェックおよびコンパイルし、ビルドする(ステップS12)。プログラム管理部156は、シーケンスプログラム30を実行形式に変換し、アプリケーションプログラム32を複数の中間コードに変換する。   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.

プログラム管理部156は、ビルドしたシーケンスプログラム30、およびアプリケーションプログラム32をストレージ108に格納する。プログラム管理部156は、ビルドされたシーケンスプログラム30を実行形式と、ソースコードとの両形式でストレージに格納する。また、プログラム管理部156は、ビルドされアプリケーションプログラム32の中間コードと、ソースコードとを対応付けて、両方をストレージ108に格納する。   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.

IECプログラム処理部150は、ストレージ108に格納されたシーケンスプログラム30の全体を所定の制御周期毎にスキャンし、対象装置への制御信号を生成する。制御アプリケーション処理部160は、シーケンスプログラム30に呼び出されたアプリケーションプログラム32の、複数の命令文に対応する複数の中間コードを一行(1つの命令文)ずつ逐次実行し(ステップS13)、対象装置への制御信号を生成する。   The IEC program processing unit 150 scans the entire sequence program 30 stored in the storage 108 every 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.

このように、本実施形態では、プログラムのビルド時にアプリケーションプログラム32の命令語が中間コードに変換されるため、プログラムの実行中に中間コードに変換する必要がなく、アプリケーションプログラム32の実行が高速になる。   As described above, in the present embodiment, since the 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.

〔統合コントローラ100における処理実行のタイミング〕
図8は、統合コントローラ100における処理実行のタイミングの一例を示すタイミングチャートである。図8に示すように、統合コントローラ100は、制御周期T1毎に、シーケンスプログラム30を実行する。また、統合コントローラ100は、アプリケーション実行周期T21毎に、アプリケーションプログラム32の1つであるアプリケーションプログラム1を実行する。また、統合コントローラ100は、アプリケーション実行周期T22毎に別のアプリケーションプログラム32であるアプリケーションプログラム2を実行する。
[Timing of Process Execution in Integrated Controller 100]
FIG. 8 is a timing chart showing an example of the timing of processing execution in the integrated controller 100. As shown in FIG. 8, 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.

統合コントローラ100は、IECプログラム処理部150の機能により、シーケンスプログラム30を高優先タスクとして実行する。高優先タスクでは、各制御周期T1内において、入出力リフレッシュ処理10と、シーケンスプログラムに含まれるシーケンス命令に従う制御指令値を出力する出力処理12と、シーケンスプログラムに含まれるモーション命令に従う制御指令値を出力する出力処理16と、アプリケーションプログラム1に従う制御指令値を出力する出力処理14−1と、アプリケーションプログラム2に従う制御指令値を出力する出力処理14−2とが行われる。   The integrated controller 100 executes the sequence program 30 as a high-priority task by the function of the IEC program processing unit 150. In 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.

アプリケーションプログラム1およびアプリケーションプログラム2の実行は、それぞれ低優先タスク1,2として設定されている。第1制御アプリケーション処理部161は、アプリケーション実行周期T21(図8に示す例では、制御周期T1の2倍)毎に、アプリケーションプログラム1の命令文に対応する複数の中間コードを逐次実行する。また、第2制御アプリケーション処理部162は、アプリケーション実行周期T22(図8に示す例では、制御周期T1の3倍)毎に、アプリケーションプログラム2の命令文に対応する複数の中間コードを逐次実行する。   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). In addition, 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). .

低優先タスクの各々は、制御周期T1より長いアプリケーション実行周期T21またはアプリケーション実行周期T22内に処理を完了できればよい。複数の低優先タスクを同時実行できない場合には、図8に示したように、一方の低優先タスクは中断(サスペンド)状態で待機させてもよい。本実施形態では、アプリケーションプログラム1およびアプリケーションプログラム2をそれぞれ処理する互いに独立した2つのアプリケーション処理部161,162が備えられているため、一方の低優先タスクを中断状態で待機させることなく、並行して処理してもよい。   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. When a plurality of low-priority tasks cannot be executed simultaneously, one of the low-priority tasks may be suspended (suspended) as shown in FIG. In the present embodiment, since two independent application processing units 161 and 162 for processing the application program 1 and the application program 2 are provided, one of the low-priority tasks is executed in parallel without suspending in a suspended state. May be processed.

高優先タスクの出力処理14−1、および出力処理14−2においては、第1制御アプリケーション処理部161、および第2制御アプリケーション処理部162により、シーケンスプログラム30に呼び出された命令文に対応する中間コードが逐次実行され、制御指令値が算出される。   In the output processing 14-1 and the output processing 14-2 of the high-priority task, 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.

なお、アプリケーション実行周期T21が制御周期T1の2倍であり、アプリケーション実行周期T22が制御周期T1の3倍である場合を例示したが、これに限られるものではない。アプリケーション実行周期T21,T22は、対象となるアプリケーションプログラム32の種類に応じて、制御周期T1の整数倍として設定でき、制御周期T1と同じ長さに設定することもできる。また、複数のアプリケーションプログラム32が存在する場合には、ユーザは、どのアプリケーションプログラム32を実行するか、および低優先タスク1、または低優先タスク2の何れで実行するかを、設定画面を使って設定できる構成であってもよい。   Although the application execution period T21 is twice as long as the control period T1, and the application execution period T22 is three times as long as the control period T1, the present invention is not limited to this. 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. When there are a plurality of application programs 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.

図9は、アプリケーションプログラム32の実行中に、表示部159に表示される情報の一例を示す図である。図9に示すように、表示部159には、アプリケーションプログラム32の中のいずれの命令文が実行されているのかが表示される。上述したように、プログラム管理部156によってビルドされたアプリケーションプログラム32は、中間コードと、ソースコードとが対応付けてストレージ108に記憶されている。これにより、制御アプリケーション処理部160は、アプリケーションプログラム32の実行中に、アプリケーションプログラム32の中のいずれの命令文を実行しているかを表示させることが出来る。制御アプリケーション処理部160は、アプリケーションプログラム32に含まれる複数の命令文を表示部に表示すると共に、実行中の命令文をハイライトする、または枠で囲む等の方法により、いずれの命令文を実行しているかをユーザに提示してもよい。   FIG. 9 is a diagram illustrating an example of information displayed on the display unit 159 during execution of the application program 32. As shown in FIG. 9, the display unit 159 displays which statement in the application program 32 is being executed. As described above, in the application program 32 built by the program management unit 156, 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.

〔中間コードについて〕
次に、プログラム管理部156によって、アプリケーションプログラム32の命令文が変換されて生成された中間コードの一例について説明する。
[About intermediate code]
Next, an example of an intermediate code generated by converting the statement of the application program 32 by the program management unit 156 will be described.

図10は、統合コントローラ100において生成される中間コードを概念的に示す模式図である。図10に示すように、アプリケーションプログラム32は、逐次実行される命令文を含んでおり、各命令文を逐次実行した場合に必要となる時間は、各命令文の内容に応じて変化する。そのため、制御周期毎に指令値を演算することが容易ではない。なお、図10には、アプリケーションプログラム32の一例として、CNCで用いられるG言語にて記述されたコードを示す。   FIG. 10 is a schematic diagram conceptually showing an intermediate code generated in the integrated controller 100. As shown in FIG. 10, 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.

本実施の形態では、プログラム管理部156は、アプリケーションプログラム32に記述された1または複数の命令文を解釈し、その解釈された内容に基づいて、制御周期毎に指令値を演算するための中間コード35を生成する。中間コード35は、アプリケーションプログラム32に記述された1または複数の命令文毎に生成されるので、1つのアプリケーションプログラム32から1または複数の中間コード35が生成される。   In the present embodiment, 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.

中間コード35の各々においては、制御周期の時刻(あるいは、時間)を入力として、指令値を演算できる関数が規定されていてもよい。すなわち、中間コード35は、制御アプリケーション処理部160が制御周期毎に指令値を演算するための関数であってもよい。このような関数を用いることで、制御アプリケーション処理部160は、中間コード35を逐次実行して、各制御周期における指令値を演算できる。   In each of the intermediate codes 35, a function that can calculate a command value by using the time (or time) of the control cycle as an input 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.

例えば、1番目の中間コード1が制御周期の10倍分の期間に亘って指令値を規定するものであるとすると、制御アプリケーション処理部160は、中間コード1を用いて、10制御周期分の期間に亘って指令値を周期的に演算する。同様に、他の中間コード2および中間コード3についても、基本的には、複数の制御周期に亘って指令値を演算できるものとなる。   For example, assuming that the first intermediate code 1 defines a command value over a period corresponding to ten times the control cycle, the control application processing unit 160 uses the intermediate code 1 and The command value is calculated periodically over a period. Similarly, the command values of the other intermediate codes 2 and 3 can be basically calculated over a plurality of control cycles.

プログラム管理部156は、シーケンスプログラム30と、アプリケーションプログラム32とを一括してビルドする際に、アプリケーションプログラム32から中間コードを生成する。これにより、IECプログラム処理部150によるシーケンスプログラム30の実行と同期して、アプリケーションプログラム32を実行させることができる。   When building the sequence program 30 and the application program 32 collectively, the program management unit 156 generates an intermediate code from the application program 32. Thus, the application program 32 can be executed in synchronization with the execution of the sequence program 30 by the IEC program processing unit 150.

図11は、統合コントローラ100における中間コードの生成例を説明するための模式図である。図11に示すように、例えば、動作すべき軌道を規定するアプリケーションプログラム32が逐次実行されると、まず、アプリケーションプログラム32に含まれる命令文が一行ずつ解釈され((1)プログラム解釈)、規定された軌道が内部的に生成される((2)軌道生成)。これらの軌道と制御周期毎の位置との関係が決定された上で、統合コントローラ100の内部的に生成された軌道を示す1または複数の関数が生成される((3)区間毎の関数生成)。プログラム管理部156は、中間コード35の一例として、このように、制御周期の時間を入力とし、指令値を出力とする関数を用いる構成であってもよい。   FIG. 11 is a schematic diagram for explaining an example of generating an intermediate code in the integrated controller 100. As shown in FIG. 11, for example, when 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) ). As an example of the intermediate code 35, 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.

また、図11に示した例では、統合コントローラ100の内部的に生成された軌道は、直線の組み合わせであるので、直線区間毎(区間1〜区間3)の軌道を時間と速度との関係を示す関数f1(t),f2(t),f3(t)が出力される。プログラム管理部156は、このように出力される関数f1(t),f2(t),f3(t)を中間コード35としてもよい。なお、プログラム管理部156は、図11に示す軌道を規定する単一の関数を中間コードとして出力してもよい。プログラム管理部156が、どのような中間コード35を出力するのかについては、要求される制御周期の時間幅などを考慮して、適宜設計されてもよい。   Further, in the example shown in FIG. 11, since the trajectory generated internally by the integrated controller 100 is a combination of straight lines, the trajectory for each straight section (section 1 to section 3) 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. Note that 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.

なお、上述の図10および図11においては、一例として、G言語を用いたアプリケーションプログラムについて説明したが、これに限らず、任意のロボット言語などのインタプリタ方式で逐次実行されるプログラムであれば、どのような言語を用いてもよい。また、プログラム管理部156は、アプリケーションプログラムで用いられている言語に応じて、任意の関数を中間コード35として出力するようにしてもよい。   In FIGS. 10 and 11 described above, an application program using the G language has been described as an example. However, 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.

〔変形例〕
図12は、変形例の統合コントローラ100の機能構成を示す図である。統合コントローラ100の機能構成は、図3を用いて説明した構成に限られるものではない。統合コントローラ100は、上述したように、入力部158と、表示部159とを一体に備えた構成であってもよいし、図12に示すように、入力部158、および表示部159を備えない構成であってもよい。
(Modification)
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. As described above, 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.

例えば、統合コントローラ100の編集部154は、上位ネットワークインタフェース182を介してネットワーク6に接続された表示装置400に編集ウィンドウ601を表示することができてもよい。そして、ユーザは、表示装置400に表示された編集ウィンドウ601を参照して、表示装置400に設けられたタッチパネルや、表示装置400に接続されたPCなどから、プログラムの編集や作成を行うことができてもよい。統合コントローラ100の編集部154は、ネットワーク6を介して、表示装置400からユーザ入力を受け取り、表示装置400に開発環境を表示させる。表示装置400は、図3に示す入力部158および表示部159として機能する。このように統合コントローラ100の編集部154は、統合コントローラ100上で実行されるプログラムを、オンラインで作成または編集する機能を提供することができてもよい。   For example, 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. As described above, 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.

また、制御アプリケーション処理部160は、アプリケーションプログラムの実行中に、アプリケーションプログラムの中のいずれの命令文を実行しているかを、表示装置400に表示させることができてもよい。   In addition, 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.

〔ソフトウェアによる実現例〕
統合コントローラ100の制御ブロック(特に編集部154、プログラム管理部156、制御アプリケーション実行部161,162、およびIECプログラム処理部150)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、ソフトウェアによって実現してもよい。
[Example of software implementation]
The control blocks of the integrated controller 100 (particularly, the editing unit 154, the program management unit 156, the control application execution units 161 and 162, and the IEC program processing unit 150) are logic circuits (hardware) formed on an integrated circuit (IC chip) or the like. ) Or by software.

後者の場合、統合コントローラ100は、各機能を実現するソフトウェアであるプログラムの命令を実行するコンピュータを備えている。このコンピュータは、例えば1つ以上のプロセッサを備えていると共に、前記プログラムを記憶したコンピュータ読み取り可能な記録媒体を備えている。そして、前記コンピュータにおいて、前記プロセッサが前記プログラムを前記記録媒体から読み取って実行することにより、本発明の目的が達成される。前記プロセッサとしては、例えばCPU(Central Processing Unit)を用いることができる。前記記録媒体としては、「一時的でない有形の媒体」、例えば、ROM(Read Only Memory)等の他、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、前記プログラムを展開するRAM(Random Access Memory)などをさらに備えていてもよい。また、前記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して前記コンピュータに供給されてもよい。なお、本発明の一態様は、前記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。   In the latter case, 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. As the processor, for example, a CPU (Central Processing Unit) can be used. As the recording medium, in addition to “temporary tangible medium”, for example, a ROM (Read Only Memory), a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, and the like can be used. Further, a RAM (Random Access Memory) for expanding the program may be further provided. Further, 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. 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.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the embodiments described above, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention.

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 ブロック
30 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 Editing window 611 First area 612 Second area 613a, 613b, 613c Tab 621, 622, 631, 632 Block

Claims (6)

実行毎に全体がスキャンされる第1プログラムと、前記第1プログラムから呼び出され逐次実行される第2プログラムとを、並行して1つの開発環境で編集可能な開発ツールを提供する編集部と、
前記第1プログラムと、前記第2プログラムとを一括でビルドするプログラム管理部と、
所定の制御周期毎に前記第1プログラムを実行することで、該制御周期毎に第1駆動装置を制御する指令を生成する第1実行部と、
前記第2プログラムに含まれる複数の命令文を逐次実行することで、第2駆動装置を制御する指令を逐次生成する第2実行部とを備える、制御装置。
An editing unit that provides a development tool that can edit a first program that is entirely scanned each time it is executed and a second program that is called and sequentially executed by the first program in a single development environment;
A program management unit configured to build the first program and the second program in a lump;
A first execution unit configured to execute the first program for each predetermined control cycle to generate a command for controlling the first drive device for each control cycle;
A second execution unit that sequentially generates a command for controlling the second drive device by sequentially executing a plurality of command statements included in the second program.
前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、
前記プログラムツリーには、前記第2駆動装置を制御するためのサンプルプログラムが含まれており、
ユーザが前記サンプルプログラムを選択すると、前記編集部は、選択された該サンプルプログラムを前記第2プログラムとして使用可能とする、請求項1に記載の制御装置。
The editing unit provides, as the development environment, an editing window including a first area for displaying a program tree and a second area for displaying source code of a selected program,
The program tree includes a sample program for controlling the second driving device,
The control device according to claim 1, wherein when the user selects the sample program, the editing unit enables the selected sample program to be used as the second program.
ユーザが、前記第1プログラムにおける位置を指定し、かつ、前記サンプルプログラムを選択すると、前記編集部は、前記第1プログラムにおける指定された位置から、選択された前記サンプルプログラムを呼び出すよう設定し、かつ、選択された前記サンプルプログラムのコードを編集可能にする、請求項2に記載の制御装置。   When a user specifies a position in the first program and selects the sample program, the editing unit sets to call the selected sample program from a specified position in the first program, 3. The control device according to claim 2, wherein a code of the selected sample program is editable. 4. 前記第2実行部は、前記第2プログラムの実行中に、前記第2プログラムの中のいずれの命令文を実行しているかを表示させる、請求項1から3のいずれか一項に記載の制御装置。   The control according to any one of claims 1 to 3, wherein the second execution unit displays which statement in the second program is being executed during execution of the second program. apparatus. 前記プログラム管理部は、
前記第1プログラムを実行形式に変換し、
前記第2プログラムを複数の中間コードに変換し、
前記第2実行部は、前記複数の命令文に対応する前記複数の中間コードを逐次実行する、請求項1から4のいずれか一項に記載の制御装置。
The program management unit includes:
Converting the first program into an executable form,
Converting the second program into a plurality of intermediate codes;
The control device according to claim 1, wherein the second execution unit sequentially executes the plurality of intermediate codes corresponding to the plurality of instruction statements.
前記編集部は、前記開発環境として、プログラムツリーを表示する第1エリアと、選択されたプログラムのソースコードを表示するための第2エリアとを含む編集ウィンドウを提供し、
前記プログラムツリーは、前記第1プログラムと、前記第1プログラムから呼び出される前記第2プログラムとを含み、
前記編集部は、前記編集ウィンドウにおいて、前記第1プログラムから呼び出される前記第2プログラムを、前記第1プログラムの中のブロックとして表示し、
ユーザが、前記第2プログラムを示すブロックまたは前記第2プログラムを示すタブを選択すると、前記編集部は、前記第2エリアに前記第2プログラムのソースコードを表示させる、請求項1に記載の制御装置。
The editing unit provides, as the development environment, an editing window including a first area for displaying a program tree and a second area for displaying source code of a selected program,
The program tree includes the first program and the second program called from the first program,
The editing unit displays, in the editing window, the second program called from the first program as a block in the first program,
The control according to claim 1, wherein when a user selects a block indicating the second program or a tab indicating the second program, the editing unit displays the source code of the second program in the second area. apparatus.
JP2018142297A 2018-07-30 2018-07-30 Control device Active JP7077848B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018142297A JP7077848B2 (en) 2018-07-30 2018-07-30 Control device
PCT/JP2019/024145 WO2020026622A1 (en) 2018-07-30 2019-06-18 Control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018142297A JP7077848B2 (en) 2018-07-30 2018-07-30 Control device

Publications (2)

Publication Number Publication Date
JP2020021124A true JP2020021124A (en) 2020-02-06
JP7077848B2 JP7077848B2 (en) 2022-05-31

Family

ID=69231611

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018142297A Active JP7077848B2 (en) 2018-07-30 2018-07-30 Control device

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022244269A1 (en) * 2021-05-21 2022-11-24 日本電信電話株式会社 Control device for computer device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230286169A1 (en) * 2020-08-11 2023-09-14 Fanuc Corporation Numerical control system and robot control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104227A (en) * 2007-10-19 2009-05-14 Omron Corp Plc control program development device and program
JP2016128995A (en) * 2015-01-09 2016-07-14 株式会社ジェイテクト Monitoring device for programmable controller
JP2016224557A (en) * 2015-05-27 2016-12-28 株式会社キーエンス Program creation support device, program, and determination method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3446256B2 (en) * 1993-09-03 2003-09-16 株式会社日立製作所 Control method and apparatus for FA system
JPH0938876A (en) * 1995-08-01 1997-02-10 Ricoh Co Ltd Simulation device
JP3658061B2 (en) * 1995-12-20 2005-06-08 株式会社日立製作所 FA system control device and method, control program generation method
JP4023978B2 (en) * 2000-03-30 2007-12-19 株式会社ジェイテクト Machine tool simulation device
JP5752179B2 (en) * 2013-06-11 2015-07-22 ファナック株式会社 Control device for controlling machine tools and robots

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104227A (en) * 2007-10-19 2009-05-14 Omron Corp Plc control program development device and program
JP2016128995A (en) * 2015-01-09 2016-07-14 株式会社ジェイテクト Monitoring device for programmable controller
JP2016224557A (en) * 2015-05-27 2016-12-28 株式会社キーエンス Program creation support device, program, and determination method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022244269A1 (en) * 2021-05-21 2022-11-24 日本電信電話株式会社 Control device for computer device

Also Published As

Publication number Publication date
JP7077848B2 (en) 2022-05-31
WO2020026622A1 (en) 2020-02-06

Similar Documents

Publication Publication Date Title
CN109388107B (en) Control device
CN109582397B (en) Control system and control device
US10761884B2 (en) Control device for operating multiple types of programs in different execution formats
JP2019053459A (en) Control apparatus and control method
US20190095246A1 (en) Support device and non-transitory storage medium
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
WO2020026622A1 (en) Control device
JP6900863B2 (en) Control unit, control method and control program
JP7310465B2 (en) Synchronous control device, synchronous control system, synchronous control method, and simulation device
JP2007068292A (en) Drive controller with plc function incorporated therein
CN109491324B (en) Control device and control method
US5060133A (en) Transputer CNC processor
EP4036670A1 (en) Control device
US20180059649A1 (en) Simulator linkage device, control method of simulator linkage device, information processing program and recording medium
JP7375632B2 (en) Control system and support equipment
WO2022249713A1 (en) Control system, system program, and debugging method
JP7396063B2 (en) Data processing method
JPH09230913A (en) Programming tool for programmable controller
WO2022254927A1 (en) Information processing device, control system, and program for developing control program
WO2020137522A1 (en) Synchronization control device, synchronization control system, synchronization control method, and simulation device
JP2023151876A (en) Control apparatus, control method, development support apparatus, and program
JPS6063603A (en) Program generation system of programmable controller
JP2021026309A (en) Control system, analyzing method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211207

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220502

R150 Certificate of patent or registration of utility model

Ref document number: 7077848

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150