JP5530417B2 - Controller development tool - Google Patents

Controller development tool Download PDF

Info

Publication number
JP5530417B2
JP5530417B2 JP2011255047A JP2011255047A JP5530417B2 JP 5530417 B2 JP5530417 B2 JP 5530417B2 JP 2011255047 A JP2011255047 A JP 2011255047A JP 2011255047 A JP2011255047 A JP 2011255047A JP 5530417 B2 JP5530417 B2 JP 5530417B2
Authority
JP
Japan
Prior art keywords
model
information
scaling
program
development tool
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.)
Active
Application number
JP2011255047A
Other languages
Japanese (ja)
Other versions
JP2012074066A (en
Inventor
幸雄 川端
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2011255047A priority Critical patent/JP5530417B2/en
Publication of JP2012074066A publication Critical patent/JP2012074066A/en
Application granted granted Critical
Publication of JP5530417B2 publication Critical patent/JP5530417B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Description

本発明は、コントローラ開発ツールに関する。 The present invention relates to a controller development tools.

従来より、例えば特許文献1には、車両のエンジンECUのためのプログラムにはおいては、開発者が直接プログラムのソースコードを記述せず、目的とするプログラムの機能を作成が簡易で視認性の良い「モデル」という形態で記述する場合が開示されている。ここで、開発者は、このモデルに対応したプログラム開発環境がインストールされたパーソナルコンピュータ等を用いて、モデルから自動的にソースコードを生成する。モデルからソースコードを生成する機能を実現するためのプログラムは、コード生成ツールと呼ばれる。コード生成ツールは、モデル開発環境に組み込まれている場合が多い。モデルからソースコードを生成するようなプログラム開発は、モデルベース開発と呼ばれる。また、モデルから自動的に生成されたソースコードをオートコードと呼ばれ、モデルからソースコードを自動生成することはオートコーディングと呼ばれる。   Conventionally, for example, in Patent Document 1, in a program for an engine ECU of a vehicle, a developer does not directly describe the source code of the program, and the function of the target program can be easily created and is easily visible. The case of describing in the form of a good “model” is disclosed. Here, the developer automatically generates source code from the model using a personal computer or the like in which a program development environment corresponding to this model is installed. A program for realizing the function of generating source code from a model is called a code generation tool. Code generation tools are often built into model development environments. Program development that generates source code from a model is called model-based development. The source code automatically generated from the model is called autocode, and the automatic generation of the source code from the model is called autocoding.

モデルベース開発に対応したプログラム開発環境としては、例えば、MathWorks(登録商標)社のMATLAB(登録商標)がある。MATLAB(登録商標)においては、ユーザ(開発者)はMATLAB(登録商標)の一機能であるSimulink(登録商標)を用いて目的とするプログラムのモデルを記述する。モデルは、ブロックと呼ばれる機能単位および機能単位間の入出力関係を示す結線の組み合わせとして記述される。すなわち、複数のブロックが結線によってつなぎ合わされた集合体がモデルである。   As a program development environment corresponding to model-based development, for example, there is MATLAB (registered trademark) of MathWorks (registered trademark). In MATLAB (registered trademark), a user (developer) describes a model of a target program using Simulink (registered trademark) which is one function of MATLAB (registered trademark). The model is described as a combination of functional units called blocks and connection lines indicating input / output relationships between the functional units. In other words, an aggregate is a model in which a plurality of blocks are connected by connection.

モデルベース開発で必須のオートコードは、モデルからソフトウエアを自動的に生成するものであり、1)モデルを作る際の制御設計、2)モデルからソフトウエアを生成するソフト設計、3)オートコードを実現するプログラム開発環境の活用、の3つで高いスキルが必要である。   The autocode required for model-based development is to automatically generate software from a model. 1) Control design when creating a model, 2) Software design to generate software from a model, 3) Autocode High skill is required in three ways: to use a program development environment that realizes

しかしながら、3つの高いスキルを習得するためには反対に非常に多くの時間を要する。   However, it takes a lot of time to acquire the three high skills.

特開2005−332333号公報JP 2005-332333 A

標準ブロックを用いて制御設計すれば自由度は高いが、ソフト設計とソフト実装の際に手直しが多くなり、ソフト設計とソフト実装を考慮した規定ブロックを用いると、制御設計時の自由度が低くなる問題がある。   Control design using standard blocks provides a high degree of freedom, but there are many modifications in software design and software implementation, and using a specific block that takes into account software design and software implementation reduces the flexibility in control design. There is a problem.

本発明は、上記課題を解決し、制御ソフトの生産性を向上させることを目的とする。   An object of the present invention is to solve the above-mentioned problems and improve the productivity of control software.

また、制御設計あるいはソフト設計とソフト実装のどちらかに偏った利便性の場合、それぞれの設計プロセスによる属人性が影響して品質低下の危険性が増す。   Also, in the case of convenience that is biased toward either control design or software design and software implementation, the personality of each design process affects the risk of quality degradation.

本発明は、上記課題を解決し、制御ソフトの品質低下を抑制することを目的とする。   An object of the present invention is to solve the above-described problems and to suppress deterioration in quality of control software.

本発明は、ライブラリモデルや、それを管理するスケーリング管理などから制御モデルを生成し、その制御モデルからオートソースコードを生成すると、パッケージング情報をオートソースコードに付加することで、オートソースコードから実装するソースファイルを生成するパッケージングを行うことにより、上記目的を達成する This onset Ming, and library model, generates a control model from such scaling management to manage it, when generating the auto source code from the control model, by adding the packaged information to the auto source code, auto source code The above object is achieved by packaging to generate a source file to be mounted from .

本発明のソフトウエア開発環境は、制御ソフトの生産性を向上させ、制御ソフトの品質低下を抑制することができる。   The software development environment of the present invention can improve the productivity of the control software and suppress the deterioration of the quality of the control software.

V字型開発の流れとそれに対応する本発明の位置付けを示した説明図である。(実施例1)It is explanatory drawing which showed the flow of V-shaped development, and the positioning of this invention corresponding to it. Example 1 パーソナルコンピュータの構成を示す説明図である。(実施例1)It is explanatory drawing which shows the structure of a personal computer. Example 1 パーソナルコンピュータ21のCPU23が実行するプログラムの構成を示す説明図である。(実施例1)It is explanatory drawing which shows the structure of the program which CPU23 of the personal computer 21 performs. Example 1 ライブラリモデル34の設定画面41の一例を示す説明図である。(実施例1)It is explanatory drawing which shows an example of the setting screen 41 of the library model. Example 1 ライブラリモデル外観51とその内部モデル52と設定画面53を示す説明図である。(実施例1)It is explanatory drawing which shows the library model external appearance 51, its internal model 52, and the setting screen 53. FIG. Example 1 ライブラリモデルを用いて作成した制御モデルの一例を示す説明図である。(実施例1)It is explanatory drawing which shows an example of the control model produced using the library model. Example 1 スケーリング管理ツールの設定画面の一例を示す説明図である。(実施例1)It is explanatory drawing which shows an example of the setting screen of a scaling management tool. Example 1 パッケージング動作概念の一例を示す説明図である。(実施例1)It is explanatory drawing which shows an example of a packaging operation | movement concept. Example 1 実装するソースファイルの一例を示す説明図である。(実施例1)It is explanatory drawing which shows an example of the source file to mount. Example 1 ライブラリモデルおよびブロックから抽出する情報とパッケージング情報の一例を示す説明図である。(実施例1)It is explanatory drawing which shows an example of the information extracted from a library model and a block, and packaging information. Example 1 ライブラリモデルおよびブロックから抽出した情報の一覧の一例を示す説明図である。(実施例1)It is explanatory drawing which shows an example of the list of the information extracted from the library model and the block. Example 1 パッケージング動作概念の別の一例を示す説明図である。(実施例1)It is explanatory drawing which shows another example of a packaging operation | movement concept. Example 1 パッケージング動作概念の別の一例を示す説明図である。(実施例1)It is explanatory drawing which shows another example of a packaging operation | movement concept. Example 1 パッケージング動作概念の別の一例を示す説明図である。(実施例1)It is explanatory drawing which shows another example of a packaging operation | movement concept. Example 1 パッケージング動作概念の別の一例を示す説明図である。(実施例1)It is explanatory drawing which shows another example of a packaging operation | movement concept. Example 1 パッケージング動作概念の別の一例を示す説明図である。(実施例1)It is explanatory drawing which shows another example of a packaging operation | movement concept. Example 1 パッケージング動作概念の別の一例を示す説明図である。(実施例1)It is explanatory drawing which shows another example of a packaging operation | movement concept. Example 1 従来からあるV字型開発の流れと開発プロセスを示す説明図である。It is explanatory drawing which shows the flow and development process of conventional V-shaped development.

以下、本発明の特徴について説明する。   The features of the present invention will be described below.

本発明のコントローラ開発ツールは、モデルによって表現される処理を実現するソースコードが生成されるコントローラ開発ツールであって、モデルをソースコード生成可能なブロックを組み合わせたライブラリモデルとして記述し、ソースコードをコントローラ用にスケーリング管理して生成し、複数の関数と合わせてソースファイルにするインターフェイス手段を有することを特徴とする。   The controller development tool of the present invention is a controller development tool for generating source code that realizes processing represented by a model. The controller development tool describes a model as a library model in which blocks that can generate source code are combined. It is characterized by having an interface means that is generated by scaling management for a controller and is made into a source file together with a plurality of functions.

また、モデルの操作ウインドウにシミュレーションとソースコードの生成に必要な情報を分けて配置することを特徴とし、出力信号の符号有り・無しを選択する機能を有することを特徴とする。   Further, the present invention is characterized in that information necessary for generation of simulation and source code is separately arranged in the operation window of the model, and has a function of selecting whether the output signal is signed or not.

さらに、モデルの操作ウインドウに、出力信号のスケーリング名称を設定する機能,出力信号のスケーリングに対して桁上げする量を設定する機能,出力信号のスケーリングをプルダウンで選択する機能,選択した出力信号のスケーリングのスケール値を表示する機能を有することを特徴とする。   In addition, the function to set the scaling name of the output signal in the model operation window, the function to set the carry amount for the scaling of the output signal, the function to select the scaling of the output signal from the pull-down, the selected output signal It has the function to display the scale value of scaling.

また、モデルに設定するスケーリング名称と、符号有り・無しと、ビット長と、スケーリング値と、を設定する機能を有し、モデルに設定された数値名称と、数値と、スケール名称と、スケール値と、説明情報と、ストレージクラスと、モデルパスの情報と、を取り出す機能を有することを特徴とする。   In addition, it has the function to set the scaling name, signed / unsigned, bit length, and scaling value to be set for the model. The numerical name, numerical value, scale name, and scale value set for the model And a function of extracting the description information, the storage class, and the model path information.

また、本発明は、モデルとスケーリング管理情報と条件毎における初期値情報とを基に、ソースコードを生成し、ソースコードに対してパッケージング処理した後、実装するためのソースファイルを出力する機能を有し、モデルが、ソースコードを生成可能なブロックを組み合わせたライブラリモデルによって構成されることを特徴とする。   Further, the present invention is a function for generating a source code based on a model, scaling management information, and initial value information for each condition, packaging a source code, and outputting a source file for mounting. And the model is constituted by a library model in which blocks capable of generating source code are combined.

次に、本発明は、ディスプレイと、CPUと、入力装置と、記憶装置と、を有する電子計算機を用いて、モデル作成プログラムと、モデル動作プログラムと、ソースコード生成プログラムと、ライブラリモデルと、スケーリング管理と、パッケージングと、を実行するものであって、モデルによって表現される処理を実現するソースコードが生成されるコントローラ開発ツールであって、モデルの操作ウインドウに、シミュレーションと、ソースコード生成に必要な情報を分けて配置することを特徴とする。   Next, the present invention provides a model creation program, a model operation program, a source code generation program, a library model, and scaling using an electronic computer having a display, a CPU, an input device, and a storage device. It is a controller development tool that executes management and packaging, and generates source code that realizes the processing expressed by the model. In the model operation window, it is used for simulation and source code generation. It is characterized by arranging necessary information separately.

さらに、本発明は、前述のコントローラ開発ツールを用いて開発する機器、具体的にはモータドライブシステムであることを特徴とする。   Furthermore, the present invention is a device developed using the above-described controller development tool, specifically, a motor drive system.

以下、本発明の詳細を図面を用いて詳細に説明する。なお、本実施例では、組み込みコントローラの一例としてモータドライブコントローラを実施例として扱う。   Hereinafter, the details of the present invention will be described in detail with reference to the drawings. In the present embodiment, a motor drive controller is treated as an example of an embedded controller.

図1は、本実施形態に係わるソフトウエア開発プロセスを示す。本発明のソフトウエア開発プロセスは、制御設計1した後、制御ソフト開発環境8のひとつであるライブラリモデル8Aを用いて、制御シミュレーションモデル構築2する。その後、制御ソフト開発環境8のひとつであるスケーリング管理8Bを用いて固定小数点演算に必要なスケーリングを行う。その後、オートコーディング3により自動生成したオートコードに対して、制御ソフト開発環境8のひとつであるパッケージング8Cを施して実装ソースファイル4を作成する。   FIG. 1 shows a software development process according to this embodiment. In the software development process of the present invention, after a control design 1, a control simulation model is constructed 2 by using a library model 8A which is one of the control software development environments 8. Thereafter, scaling necessary for fixed-point arithmetic is performed using a scaling management 8B, which is one of the control software development environments 8. Thereafter, the packaging source file 4 is created by applying packaging 8C, which is one of the control software development environments 8, to the autocode automatically generated by the autocoding 3.

図2は、これらの処理を実行するパーソナルコンピュータ21の構成を示す。このパーソナルコンピュータ21は、ディスプレイ22,CPU23,入力装置24,記憶装置25,RAM26,ROM27等から構成される。   FIG. 2 shows the configuration of the personal computer 21 that executes these processes. The personal computer 21 includes a display 22, a CPU 23, an input device 24, a storage device 25, a RAM 26, a ROM 27, and the like.

ディスプレイ22は、CPU23の出力情報をユーザ(開発者)に対して映像で表示する。   The display 22 displays the output information of the CPU 23 as a video for the user (developer).

CPU23は、パーソナルコンピュータ21に電源が投入されることによって起動すると、ROM27から所定のブートプログラムを読み出して実行し、このブートプログラムに規定されるオペレーティングシステム(以下OSと記す)その他のプログラムを記憶装置25から読み出して実行することにより、起動処理を行う。起動処理以後、電源が遮断されるまで、CPU23は、入力装置24からの信号、OSによって定められたスケジュール等に基づいて記憶装置25に記録されている各種プログラムを当該OS上のプロセスとして実行する。また、上記起動処理におけるプロセスにおいて、CPU23は必要に応じて入力装置24からの信号入力を受け付け、またディスプレイ22に映像を出力し、またRAM26,記憶装置25に対してデータの読み出し/書き出しの制御を行う。   When the CPU 23 is activated when the personal computer 21 is turned on, the CPU 23 reads and executes a predetermined boot program from the ROM 27, and stores an operating system (hereinafter referred to as OS) and other programs defined in the boot program. The activation process is performed by reading from 25 and executing. After the startup process, until the power is turned off, the CPU 23 executes various programs recorded in the storage device 25 as processes on the OS based on signals from the input device 24, a schedule determined by the OS, and the like. . Further, in the process in the startup process, the CPU 23 receives a signal input from the input device 24 as necessary, outputs a video to the display 22, and controls data read / write to the RAM 26 and the storage device 25. I do.

入力装置24は、キーボード,マウス,音声入力等から構成され、ユーザ(開発者)が操作することによって、その操作に応じた信号をCPU23に出力する。   The input device 24 includes a keyboard, a mouse, a voice input, and the like, and outputs a signal corresponding to the operation to the CPU 23 when operated by a user (developer).

記憶装置25は、読み出し,書き込み可能な不揮発性メモリであり、当該各種プログラムが記憶されており、後述するモデルや制御ソフト開発環境が記憶されている。   The storage device 25 is a readable and writable nonvolatile memory, stores various programs, and stores a model and a control software development environment described later.

RAM26は、読み出し,書き込み可能な揮発性メモリであり、ROM27は読み出し専用の不揮発性メモリである。   The RAM 26 is a readable / writable volatile memory, and the ROM 27 is a read-only nonvolatile memory.

RAM26は、CPU23がROM27,記憶装置25に記憶されたプログラムを実行する際にそのプログラムや演算結果を一時的に保存する記憶領域、および作業用のデータを一時的に保存するための記憶領域として用いられる。   The RAM 26 is a storage area for temporarily storing the program and calculation results when the CPU 23 executes the program stored in the ROM 27 and the storage device 25, and a storage area for temporarily storing work data. Used.

ROM27は、CPU23が読み出して実行するプログラム等があらかじめ記憶されている。   The ROM 27 stores in advance a program that the CPU 23 reads and executes.

図3は、パーソナルコンピュータ21のCPU23が実行するプログラムの構成を示す。CPU23はモデル作成プログラム31,モデル動作プログラム32,ソースコード生成プログラム33,ライブラリモデル34,スケーリング管理35,パッケージング36等を実行する。   FIG. 3 shows a configuration of a program executed by the CPU 23 of the personal computer 21. The CPU 23 executes a model creation program 31, a model operation program 32, a source code generation program 33, a library model 34, a scaling management 35, a packaging 36, and the like.

なお、以降は、プログラムを実行することによるCPU23の動作をその実行されるプログラム自体の動作であるとして説明する。   Hereinafter, the operation of the CPU 23 by executing the program will be described as the operation of the executed program itself.

モデル作成プログラム31は、記憶装置25に記憶されているプログラムを読み出し、ユーザ(開発者)によるモデル作成を可能にする。   The model creation program 31 reads a program stored in the storage device 25 and allows a user (developer) to create a model.

モデルは、所定の規則に基づいて信号を出力することを表現するブロックおよびそれらブロック間の信号の入出力の繋がりを表現する結線等からなり、モデル作成プログラム31に予め設けられているブロックと、後述するライブラリモデル34に記憶されているモデルとから作成する。そして、このモデルは、記憶装置25に記憶されるようになっている。   The model includes a block that represents outputting a signal based on a predetermined rule, a connection that represents a signal input / output connection between the blocks, and the like, and a block that is provided in advance in the model creation program 31; It is created from a model stored in a library model 34 to be described later. This model is stored in the storage device 25.

なお、モデル作成プログラム31としては、例えばMATLAB(登録商標)上で動作するSimulink(登録商標)と呼ばれるプログラムがある。   As the model creation program 31, there is a program called Simulink (registered trademark) that operates on, for example, MATLAB (registered trademark).

モデル動作プログラム32は、上記作成したモデルを動作させるプログラムである。   The model operation program 32 is a program for operating the created model.

なお、モデル動作プログラム32としては、例えばMATLAB(登録商標)上で動作するSimulink(登録商標)と呼ばれるプログラムがある。   As the model operation program 32, for example, there is a program called Simulink (registered trademark) that operates on MATLAB (registered trademark).

ソースコード生成プログラム33は、前記作成したモデルによって表現される信号処理を実現するソースコードを生成する。   The source code generation program 33 generates source code for realizing signal processing expressed by the created model.

ライブラリモデル34は、あらかじめ、モデル動作プログラム32およびソースコード生成プログラム33とスケーリング管理35に対応したモデルで構成されたモデルの集まりである。   The library model 34 is a collection of models configured in advance with models corresponding to the model operation program 32, the source code generation program 33, and the scaling management 35.

図4は、ライブラリモデル34の設定画面41の一例を示す。設定画面41では、モデル動作プログラム32でユーザ(開発者)が設定変更する最低限必要な項目に絞った設定条件と、ソースコード生成プログラム33でユーザ(開発者)が設定変更する最低限必要な項目に絞った項目にすることで、属人性による人為的にミスを抑制することができる。   FIG. 4 shows an example of the setting screen 41 of the library model 34. In the setting screen 41, setting conditions narrowed down to the minimum necessary items to be changed by the user (developer) in the model operation program 32, and minimum required for the user (developer) to change the settings in the source code generation program 33. By making items narrowed down to items, it is possible to artificially suppress mistakes due to personality.

設定画面41は、定数出力を実現するライブラリモデル(Constan)の例で、定数を設定する設定欄のほか、コード生成に関連して、定数タイプとして、“定数(ROM)”や“変数(RAM)”への設定する機能を設けてある。(これは、MATLAB用語でいうところのSimulinkParameterやSimulinkSignalへの設定機能)また、出力データタイプとして、“逆伝搬による継承”のほか、“ダイアログにより指定”で、出力スケーリング名称を設定する機能も設けてある。そのほか、出力スケーリング名称が示す出力スケーリングに対して、精度良く出力(高い分解能で出力)するために、“出力スケーリングに対する桁上げシフト量”として2のべき乗(シフト量)の単位で設定する機能を設けている。(これは、MATLAB用語でいうところのNumericTypeへの設定機能)また、“出力スケーリング名称”は、新たな名称を登録することに加えて、既にNumericTypeとして出力スケーリング名称が既に登録されている場合は、その登録してある出力スケーリング名称をプルダウン表示して、その中から選択できる機能を設けている。   The setting screen 41 is an example of a library model (Constan) that realizes constant output. In addition to a setting field for setting a constant, a constant type “constant (ROM)” or “variable (RAM) is associated with code generation. ) ”Is set. (This is a setting function to SimulinkParameter and SimulinkSignal in terms of MATLAB) In addition to “inherit by back propagation” as an output data type, there is also a function to set an output scaling name by “specified by dialog” It is. In addition, in order to output the output scaling indicated by the output scaling name with high precision (output with high resolution), a function to set the "carry shift amount for output scaling" in units of powers of 2 (shift amount) Provided. (This is a setting function for NumericType in terms of MATLAB.) In addition to registering a new name, “Output scaling name” can be used when the output scaling name has already been registered as NumericType. A function is provided in which the registered output scaling names are displayed in a pull-down manner, and can be selected from them.

これにより、1)シミュレーションに必要な情報とコード生成に必要な情報を分けて明示、2)シミュレーションに必要な情報の設定機能、3)コード生成に必要なROM・RAM情報、4)コード生成に必要なスケーリング情報、を属人性による人為的ミスを抑制して効率的に設定,確認することができる。   As a result, 1) information necessary for simulation and information necessary for code generation are clearly shown, 2) information setting function necessary for simulation, 3) ROM / RAM information necessary for code generation, 4) code generation Necessary scaling information can be efficiently set and confirmed while suppressing human error due to personality.

また、設定画面42は、加算を実現するライブラリモデル(Add)の例で、“整数オーバーフローで飽和”では、加算時の演算オーバーフローに対する対処法を設定する機能で、“出力信号は入力信号に合わせて符号を付与”では、加算するどれかの入力スケールが(数値として正・負を取り得る)符号付きの場合、その出力のスケールには、符号を付与する機能を設けてある。また、出力範囲が入力範囲により限定される場合や、処理の都合上、符号無しで処理したい場合を考慮して、出力のスケールには、強制的に符号無しとする機能も設けてある。   The setting screen 42 is an example of a library model (Add) that realizes addition. In “saturation with integer overflow”, the setting screen 42 is a function for setting a countermeasure against an operation overflow at the time of addition. In “add sign”, when any of the input scales to be added is signed (can be positive or negative as a numerical value), the scale of the output is provided with a function of adding a sign. In consideration of the case where the output range is limited by the input range or the case where it is desired to perform processing without a sign for the convenience of processing, the output scale is also provided with a function for forcibly having no sign.

これにより、どちらかの入力信号が負の値を取り得る時、加算した値は負の値を取り得るため、ユーザが特別に設定を変更しない場合には入力信号のどちらかが符号付きの場合には、演算結果を考慮して出力信号を自動的に符号付きにする。また、どちらかの入力信号が負の値を取り得る時でも、加算した値が必ず正の値しか取らないことが確定している場合には、モデルを変更することなくユーザ(開発者)の設定により強制的に符号なしで演算結果を出力信号として出力することができる。   As a result, when either input signal can take a negative value, the added value can take a negative value, so if the user does not change the setting specially, either of the input signals is signed The output signal is automatically signed in consideration of the calculation result. Also, even if either input signal can take a negative value, if it is determined that the added value can only take a positive value, the user (developer) can change without changing the model. The calculation result can be forcibly output as an output signal without a sign by setting.

さらに、設定画面43は、乗算を実現するライブラリモデル(Product)の例で、“整数オーバーフローで飽和”では、乗算時の演算オーバーフローに対する対処法を設定する機能で、“出力スケーリング名称”では、設定したスケーリング名称で定義したスケーリングを指定する機能で、“出力スケーリングに対する桁上げシフト量”では、前記、“出力スケーリング名称”で定義したスケーリングに対して分解能を調整するスケーリングのシフト量を設定できる機能で、“出力信号は入力信号に合わせて符号を付与”では、乗算するどれかの入力スケールが(数値として正・負を取り得る)符号付きの場合、その出力のスケールには、符号を付与する機能を設けてある。また、出力範囲が入力範囲により限定される場合や、処理の都合上、符号無しで処理したい場合を考慮して、出力のスケールには、強制的に符号無しとする機能も設けてある。また、“出力スケーリング名称”は、新たな名称を登録することに加えて、既にNumericTypeとして出力スケーリング名称が既に登録されている場合は、その登録してある出力スケーリング名称をプルダウン表示して、その中から選択できる機能を設けている。また、図面中では表示を省略しているが、登録しているスケーリング名称を選択した場合、符号の有無やビット長や分解能など、選択したスケーリング名称で設定されているスケール値を表示する機能も設けている。また、選択したスケーリング名称の設定を設定画面上で変更することができる機能も設けている。   Furthermore, the setting screen 43 is an example of a library model (Product) that realizes multiplication. “Saturation with integer overflow” is a function for setting a countermeasure against an operation overflow at the time of multiplication. A function that allows you to set the scaling shift amount that adjusts the resolution with respect to the scaling defined in “Output Scaling Name” in “Carry shift amount relative to output scaling”. In "Output signal is signed according to the input signal", if any input scale to be multiplied is signed (possibly can be positive or negative as a numerical value), the output scale is signed. The function to do is provided. In consideration of the case where the output range is limited by the input range or the case where it is desired to perform processing without a sign for the convenience of processing, the output scale is also provided with a function for forcibly having no sign. In addition to registering a new name, “Output scaling name”, if an output scaling name has already been registered as NumericType, pull down the registered output scaling name and A function that can be selected from among them is provided. In addition, although not shown in the drawing, when a registered scaling name is selected, there is also a function to display the scale value set with the selected scaling name, such as the presence or absence of a code, bit length, and resolution. Provided. There is also a function that allows the setting of the selected scaling name to be changed on the setting screen.

これにより、異なるスケーリングの入力を乗算した場合の出力スケーリングを指定することができる。また、出力スケーリング名称に対して、相対的に演算精度を高めた状態で出力スケーリングを調整できるため、乗算時の出力スケーリングの自由度が広がるとともに、後の演算に対して演算精度良く信号を出力することができる。さらに、どちらかの入力信号が負の値を取り得る時、乗算した値は負の値を取り得るため、ユーザ(開発者)が特別に設定を変更しない場合には入力信号のどちらかが符号付きの場合には、演算結果を考慮して出力信号を自動的に符号付きにする。また、どちらかの入力信号が負の値を取り得る時でも、乗算した値が必ず正の値しか取らないことが確定している場合には、モデルを変更することなくユーザ(開発者)の設定により強制的に符号なしで演算結果を出力信号として出力することができる。また、スケーリング名称のプルダウンから選択することができるため、スケーリング名称のスペル間違いなど、人為的なミスが少なく操作性,生産性を向上できる。また、スケーリング名称で設定されているスケール値を設定画面上で確認できるため、視認性,生産性が向上する。また、スケーリング名称で設定されているスケール値を設定画面上で変更できるため、操作性,生産性が向上する。   As a result, it is possible to specify output scaling when multiplying inputs having different scalings. In addition, output scaling can be adjusted with relatively high calculation accuracy with respect to the output scaling name, so the degree of freedom of output scaling during multiplication is widened, and signals are output with high calculation accuracy for subsequent calculations. can do. In addition, when either input signal can take a negative value, the multiplied value can take a negative value, so if the user (developer) does not change the setting specially, either of the input signals will have a sign. In the case of, the output signal is automatically signed with the calculation result taken into account. Even if either input signal can take a negative value, if it is determined that the multiplied value will always take only a positive value, the user (developer) can change without changing the model. The calculation result can be forcibly output as an output signal without a sign by setting. In addition, since the scaling name can be selected from a pull-down menu, there are few human errors such as a spelling error in the scaling name, and operability and productivity can be improved. Moreover, since the scale value set by the scaling name can be confirmed on the setting screen, visibility and productivity are improved. In addition, since the scale value set by the scaling name can be changed on the setting screen, operability and productivity are improved.

図5は、一次遅れを実現するライブラリモデル(Filter)の例で、ライブラリモデル外観51とその内部モデル52と設定画面53を示す。ライブラリモデル外観51は、設定画面53で設定した情報が表示される機能を付与している。   FIG. 5 shows an example of a library model (Filter) that realizes a first-order lag, and shows a library model appearance 51, its internal model 52, and a setting screen 53. The library model appearance 51 has a function of displaying information set on the setting screen 53.

これにより、設定画面53を開くことなくライブラリモデル外観51からその時点での設定情報を知ることができ、ユーザ(開発者)の視認性・作業性を向上することができる。   Thereby, the setting information at that time can be known from the library model appearance 51 without opening the setting screen 53, and the visibility and workability of the user (developer) can be improved.

内部モデル52は、複数のブロックあるいはモデルで構成されており、ソースコード生成を考慮して、ブロックあるいはモデルの1つ以上の箇所にスケーリング情報を設定するブロックが存在する。   The internal model 52 is composed of a plurality of blocks or models, and there are blocks that set scaling information in one or more locations of the block or model in consideration of source code generation.

また、内部モデル52を構成している複数のブロックには、設定画面で設定した情報が、NumericTypeやSimulinkParameterやSimulinkSignal情報として設定されるようにMATLAB言語によるプログラムを用いた仕掛けが施されている。(本実施例ではMATLAB言語を用いたが、設定画面で設定した情報が複数のブロックに設定するために他のプログラム言語や情報伝達手段を用いても良い)。   A plurality of blocks constituting the internal model 52 are subjected to a device using a program in the MATLAB language so that information set on the setting screen is set as NumericType, SimulinkParameter, and SimulinkSignal information. (In this embodiment, the MATLAB language is used, but other program languages and information transmission means may be used to set the information set on the setting screen in a plurality of blocks).

これにより、内部モデルを構成する複数のブロックに設定する情報を設定画面に纏めることができるため、内部モデルにおける各ブロックをそれぞれ開いて設定する作業(手間)が不要となる。また、内部モデルの各ブロックに設定する情報をライブラリモデルの設定画面に纏めることで、ユーザ(開発者)は集中した情報管理ができるため、制御モデルの可読性(視認性),保守性,作業性,生産性が向上する。   As a result, information to be set for a plurality of blocks constituting the internal model can be collected on the setting screen, so that an operation (labor) for opening and setting each block in the internal model is not required. In addition, by gathering the information to be set for each block of the internal model in the library model setting screen, the user (developer) can perform centralized information management, so the readability (visibility), maintainability, and workability of the control model , Productivity is improved.

これにより、モデル動作プログラム32およびソースコード生成プログラム33とスケーリング管理35に対応した上で、ユーザ(開発者)の視認性,ユーザ(開発者)の視認性・作業性を向上することができる。   As a result, the visibility of the user (developer) and the visibility / workability of the user (developer) can be improved while supporting the model operation program 32, the source code generation program 33, and the scaling management 35.

つまり、これらにより、モデル作成プログラム31におけるモデル作成を迅速かつ、比較的容易に行うことができる。また、ソースコード生成プログラム33に対応していることからソースコード生成が確実にかつ効率よくコード生成できる。さらに、スケーリング管理35に対応していることで、モデル変更することなくスケーリングを変更することができる。   That is, the model creation in the model creation program 31 can be performed quickly and relatively easily. Further, since the source code generation program 33 is supported, the source code generation can be performed reliably and efficiently. Furthermore, since the scaling management 35 is supported, the scaling can be changed without changing the model.

図6は、前記ライブラリモデルを用いて作成したモータドライブシステムを実現する制御モデルの一例である。   FIG. 6 is an example of a control model for realizing a motor drive system created using the library model.

制御モデル61は、出力電圧Sig.61dを算出するモデルで、乗算モデル61aを用いて電流値と抵抗値から算出した電圧Sig.61aと、乗算モデル61bと乗算モデル61cを用いて角速度値とインダクタンス値と電流値から算出した電圧Sig.61cとから、加算モデル61dを用いて電圧Sig.61dを出力電圧として出力する。   The control model 61 is a model for calculating the output voltage Sig.61d. The voltage Sig.61a calculated from the current value and the resistance value using the multiplication model 61a, the angular velocity value and the inductance using the multiplication model 61b and the multiplication model 61c. From the voltage Sig.61c calculated from the value and the current value, the voltage Sig.61d is output as an output voltage using the addition model 61d.

ここで、物理的に異なる単位の演算を行う、乗算モデル61a,61b,61cで、その出力する物理単位に合わせてスケール情報(スケール名称含む)を設定する。また、加算モデル61dの入力にあたる乗算モデル61aと乗算モデル61cの出力は、スケール値(スケール名称)に対する桁上げする設定にしている。これにより、コード生成した場合の加算モデル61dで演算する際に演算精度を向上した状態で、演算結果を出力することができる。なお、各モデルの下部にはそれぞれ、スケール情報(スケール名称)が表示しており、設定画面を開くことなく、情報を確認することができる。これにより、視認性,作業性,生産性を向上できる。   Here, the scale information (including the scale name) is set in accordance with the physical unit to be output in the multiplication models 61a, 61b, and 61c that perform operations in physically different units. Further, the output of the multiplication model 61a and the multiplication model 61c, which is the input of the addition model 61d, is set to carry the scale value (scale name). As a result, the calculation result can be output in a state where the calculation accuracy is improved when the calculation is performed by the addition model 61d when the code is generated. Note that scale information (scale name) is displayed at the bottom of each model, and the information can be confirmed without opening the setting screen. Thereby, visibility, workability, and productivity can be improved.

制御モデル62は、所定の値を前回の値に加算して出力するモデルで、所定の値が設定された定数モデル62aと前回値モデル62cを加算モデル62bで加算して出力するモデルである。   The control model 62 is a model that adds a predetermined value to the previous value and outputs it, and is a model that outputs the constant model 62a and the previous value model 62c set with the predetermined value by the addition model 62b.

ここで、定数モデル62aでは所定の値を設定した設定値情報が設定されている。また、前回値モデル62cでは初期値情報とコード生成した場合の変数名情報が設定されている。これにより、コード生成した場合の設定値情報に対応する数値や定数名称の他、初期値情報に対応する数値や定数名称、変数名情報に対応する変数名を指定することができる。なお、各モデルの下部にはそれぞれ、スケール情報(スケール名称)が表示しており、設定画面を開くことなく、情報を確認することができる。これにより、視認性,作業性,生産性を向上できる。   Here, in the constant model 62a, set value information in which a predetermined value is set is set. In the previous value model 62c, initial value information and variable name information when a code is generated are set. Thereby, in addition to the numerical value and constant name corresponding to the set value information when the code is generated, the numerical value corresponding to the initial value information, the constant name, and the variable name corresponding to the variable name information can be designated. Note that scale information (scale name) is displayed at the bottom of each model, and the information can be confirmed without opening the setting screen. Thereby, visibility, workability, and productivity can be improved.

これらのように、予めコード生成を考慮して作成したライブラリモデルを利用して制御モデルを構成することで、演算精度良くかつ、設定する情報の増加を防ぎ、可読性,保守性,作業性,生産性を向上できる。   By constructing a control model using a library model that has been created in consideration of code generation as described above, it is possible to improve the calculation accuracy and prevent an increase in information to be set. Readability, maintainability, workability, and production Can be improved.

スケーリング管理35は、モデル動作プログラム32でモデル動作させる際およびソースコード生成プログラム33でソースコードを生成する際に、固定小数点あるいは浮動小数点でコード生成するスケーリング情報を提供管理する。   The scaling management 35 provides and manages scaling information for code generation in fixed point or floating point when the model operation program 32 performs model operation and the source code generation program 33 generates source code.

図7は、スケーリング管理35の設定画面71の一例を示す。設定画面71では、モータドライブに必要な物理量(物理単位)である電流,電圧,周波数,抵抗等々に対して、固定小数点・浮動小数点を示す設定や固定小数点演算時における、そのビット長や符号の有無等、1bitあたりの物理単位量を表す分解能、いわゆるスケーリング値を設定・管理する。   FIG. 7 shows an example of the setting screen 71 of the scaling management 35. On the setting screen 71, for the physical quantity (physical unit) necessary for the motor drive, such as current, voltage, frequency, resistance, etc., the setting of the fixed point / floating point and the bit length and sign of the fixed point calculation are performed. Sets and manages the resolution that represents the physical unit quantity per bit, such as presence / absence, so-called scaling value.

なお、図面上記載を省略しているが、本実施例では、1ボタンですべてのスケーリングを浮動小数点(double)型に切り替える機能も設けた。   Although not shown in the drawings, this embodiment also has a function of switching all scalings to a floating point (double) type with one button.

これにより、モデル動作プログラム32に必要となる情報やソースコード生成プログラム33に必要となる情報を管理することができる。また、これらの情報を管理することで、ユーザ(開発者)の視認性・作業性を向上することができる。さらに、モデルを変更することなく、包括的にスケーリングを変更することができるため、ユーザ(開発者)の作業性が大幅に向上する。   Thereby, information required for the model operation program 32 and information required for the source code generation program 33 can be managed. Moreover, by managing these pieces of information, it is possible to improve the visibility and workability of the user (developer). Furthermore, since the scaling can be comprehensively changed without changing the model, the workability of the user (developer) is greatly improved.

また、本スケーリング管理ツールで設定した情報をスクリプトmファイルとしてファイル出力して、そのmファイルを実行することで、MATLAB/Simulink上のモデルやブロックにNumericTypeなどのスケール情報を受け渡すことができる機能を設けた。   In addition, a function that outputs scale information such as NumericType to models and blocks on MATLAB / Simulink by outputting the information set with this scaling management tool as a script m file and executing that m file. Was provided.

これにより、MATLAB/Simulink上でモデルやブロックを開いてスケール値を設定することや、MATLAB/Simulink上のスケール設定画面を操作することなく、スケール値の包括的に管理を行うことができ、ユーザ(開発者)の視認性,操作性,作業性,生産性を大幅に向上することができる。   This makes it possible to manage scale values comprehensively without opening models or blocks on MATLAB / Simulink and setting scale values, or operating the scale setting screen on MATLAB / Simulink. (Developer's) visibility, operability, workability, and productivity can be greatly improved.

つまり、これらにより、作成した前記モデルを変更することなく、スケーリングを変更して製品毎に組み込みシステムに適したソースコードを生成することができ、モデルの再利用性,操作性,作業性,生産性を大幅に向上することができる。   In other words, without changing the created model, it is possible to change the scaling and generate source code suitable for the embedded system for each product, reusability of the model, operability, workability, production Can greatly improve the performance.

パッケージング36は、ソースコード生成プログラム33から生成されたソースコードの他に、前記モデルに含まれる初期値の情報を初期化処理として追加したり、製品毎に初期化処理を生成したり、製品毎に合わせて出力値毎に初期化処理を作成する。   In addition to the source code generated from the source code generation program 33, the packaging 36 adds initial value information included in the model as an initialization process, generates an initialization process for each product, Create an initialization process for each output value.

モータドライブシステムでは、制御モデルに設定されている初期値を電源投入時に反映させるべき場合や、インバータ停止あるいはモータ停止時に反映させるべき場合など、製品毎、制御内容毎に異なる。そのため、MATLAB/Simulinkで生成されるオートソースコードの初期化関数だけでは、最適に実装するソースファイルを得ることができない。そのため、本実施例では、MATLAB/Simulinkで生成されるオートソースコードに対して、電源投入時の初期化関数や、インバータ停止あるいはモータ停止時の初期化関数を生成して、実装するソースファイルを得る処理として、パッケージング処理を施した。   In the motor drive system, the initial value set in the control model differs depending on the product and control content, such as when the initial value should be reflected when the power is turned on or when the inverter should be reflected when the inverter is stopped or when the motor is stopped. For this reason, it is not possible to obtain a source file that is optimally mounted only with the initialization function of the auto source code generated by MATLAB / Simulink. Therefore, in this embodiment, for the auto source code generated by MATLAB / Simulink, the initialization function at power-on and the initialization function at inverter stop or motor stop are generated and the source file to be implemented is As a process to obtain, a packaging process was performed.

図8は、パッケージング動作概念の一例を示す。ユーザ(開発者)が作成した制御モデル82と、スケーリング管理情報83と、条件毎における初期値情報84等から、パッケージング処理81を行い、実装するソースファイル85を生成する。   FIG. 8 shows an example of the packaging operation concept. From the control model 82 created by the user (developer), the scaling management information 83, the initial value information 84 for each condition, etc., the packaging process 81 is performed to generate a source file 85 to be mounted.

図9は、パッケージング処理を施した後の実装するソースファイルの概要である。制御モデルの動作を示す処理関数91と、電源投入時に実行する初期化関数92と、インバータ停止時に実行する初期化関数93とモータ停止時に実行する初期化関数94である。   FIG. 9 is an outline of a source file to be mounted after the packaging process. A processing function 91 indicating the operation of the control model, an initialization function 92 executed when the power is turned on, an initialization function 93 executed when the inverter is stopped, and an initialization function 94 executed when the motor is stopped.

これにより、実装するソースファイルの1つのモジュールとし、それぞれの関数を適切なタイミングで関数呼び出しすることで、ソフトウエア管理の利便性,作業性,生産性が向上する。   Thus, the convenience, workability, and productivity of software management are improved by making each function a function module at an appropriate timing as one module of the source file to be mounted.

図10は、初期化関数を作成する際に、モデルおよびブロックから抽出する情報とそのモデルとブロックの一例である。各モデルやブロックからは、モデルパス情報をはじめ、ライブラリモデルに設定したストレージクラス情報までを抽出して、その情報を基に、初期化関数で処理する内容をパッケージング処理によって実行し、実装するソースファイル中の初期化関数として生成した。   FIG. 10 shows an example of information extracted from the model and block and the model and block when creating the initialization function. From each model or block, the model path information and the storage class information set in the library model are extracted, and based on that information, the contents to be processed by the initialization function are executed and implemented by the packaging process. Generated as an initialization function in the source file.

図11は、抽出した各情報をパッケージング情報としてファイル出力した一例である。本情報をパッケージング処理時に利用して実装するソースファイルを生成する。   FIG. 11 shows an example in which each extracted information is output as a file as packaging information. Generate a source file to be implemented using this information during packaging processing.

また、実装するソースファイルの生成は、制御モデルと各種情報を基に以下に示す数種類のプロセスで実施した。   The source file to be implemented was generated by the following several processes based on the control model and various information.

図12は、パッケージング動作概念の別の一例を示す。ユーザ(開発者)が作成した制御モデルと制御モデルの初期値情報1202と、スケーリング管理情報1203等から、パッケージング処理1201を行い、実装するソースファイル1204を生成する。   FIG. 12 shows another example of the packaging operation concept. From the control model created by the user (developer), the initial value information 1202 of the control model, the scaling management information 1203, etc., the packaging process 1201 is performed to generate the source file 1204 to be mounted.

図13は、パッケージング動作概念の別の一例を示す。ユーザ(開発者)が作成したスケーリング管理情報1301と条件毎における初期値情報1302を制御モデル1303へ反映させて、その後、制御モデルからオートソースコード1304を生成して、パッケージング処理1305を施して、実装するソースファイル1306を生成する。   FIG. 13 shows another example of the packaging operation concept. The scaling management information 1301 created by the user (developer) and the initial value information 1302 for each condition are reflected in the control model 1303, and then the auto source code 1304 is generated from the control model, and the packaging process 1305 is performed. A source file 1306 to be mounted is generated.

これにより、制御モデルを変更することなく、コード生成する条件を変えてコード生成した後、パッケージング処理を施して実装するソースファイルを作ることができる。   Thereby, without changing the control model, after generating code by changing the code generation conditions, it is possible to create a source file to be packaged and mounted.

図14は、パッケージング動作概念の別の一例を示す。ユーザ(開発者)が作成した制御モデルと制御モデルの初期値情報1401と、スケーリング管理情報1402から、オートソースコード1403を生成し、パッケージング処理1404を施して、実装するソースファイル1405を生成する。   FIG. 14 shows another example of the packaging operation concept. An auto source code 1403 is generated from a control model created by a user (developer), initial value information 1401 of the control model, and scaling management information 1402, and a packaging process 1404 is performed to generate a source file 1405 to be mounted. .

これにより、制御モデルと制御モデルの初期値情報は変更することなく、スケーリング管理情報を変更することで、コード生成する条件を変えてコード生成した後、パッケージング処理を施して実装するソースファイルを作ることができる。   As a result, by changing the scaling management information without changing the control model and the initial value information of the control model, the code is generated by changing the conditions for generating the code, and then the source file to be packaged is implemented. Can be made.

図15は、パッケージング動作概念の別の一例を示す。ユーザ(開発者)が作成したスケーリング管理情報1501と条件毎における初期値情報1502を制御モデル1503へ反映し、オートソースコード1504を生成し、パッケージング情報1505に合わせて、パッケージング処理1506を行い、実装するソースファイル1507を生成する。   FIG. 15 shows another example of the packaging operation concept. The scaling management information 1501 created by the user (developer) and the initial value information 1502 for each condition are reflected in the control model 1503 to generate the auto source code 1504, and the packaging process 1506 is performed according to the packaging information 1505. A source file 1507 to be mounted is generated.

これにより、制御モデルを変更することなく、スケーリング管理情報と初期値情報を変更することで、コード生成する条件を変えてコード生成した後、パッケージング情報処理を変更することなく、パッケージング情報を変更することで、パッケージング条件を変えて実装するソースファイルを作ることができる。   As a result, by changing the scaling management information and initial value information without changing the control model, after changing the conditions for generating the code and generating the code, the packaging information can be changed without changing the packaging information processing. By changing it, you can create a source file to be implemented with different packaging conditions.

図16は、パッケージング動作概念の別の一例を示す。ユーザ(開発者)が作成した制御モデルと制御モデルの初期値情報1601と、スケーリング管理情報1602から、オートソースコード1603を生成し、パッケージング情報1606に合わせて、パッケージング処理1604を行い、実装するソースファイル1605を生成する。   FIG. 16 shows another example of the packaging operation concept. The auto source code 1603 is generated from the control model created by the user (developer), the initial value information 1601 of the control model, and the scaling management information 1602, and the packaging process 1604 is performed according to the packaging information 1606, and the implementation is performed. A source file 1605 is generated.

これにより、制御モデルと制御モデルの初期値情報は変更することなく、スケーリング管理情報を変更することで、コード生成する条件を変えてコード生成した後、パッケージング情報処理を変更することなく、パッケージング情報を変更することで、パッケージング条件を変えて実装するソースファイルを作ることができる。   As a result, the control model and the initial value information of the control model are not changed, the code is generated by changing the scaling management information, the code generation condition is changed, and the packaging information processing is not changed. By changing the packaging information, it is possible to create a source file to be implemented with different packaging conditions.

図17は、パッケージング動作概念の別の一例を示す。ユーザ(開発者)が作成したオートソースコード1701に対して、スケーリング管理情報1702と条件毎における初期値情報1703とパッケージング情報1704に合わせて、パッケージング処理1705を行い、実装するソースファイル1706を生成する。   FIG. 17 shows another example of the packaging operation concept. The auto source code 1701 created by the user (developer) is subjected to packaging processing 1705 in accordance with the scaling management information 1702, the initial value information 1703 and the packaging information 1704 for each condition, and the source file 1706 to be mounted is Generate.

これにより、制御モデルがなくても、パッケージングの際の初期値とパッケージング情報を変更することで、パッケージング条件を変えて実装するソースファイルを作ることができる。   As a result, even if there is no control model, by changing the initial value and packaging information at the time of packaging, it is possible to create a source file to be mounted by changing the packaging conditions.

これにより、モータドライブシステムにおけるコントローラの電源投入初期化や、モータ停止時の初期化や、インバータ停止時の初期化等の動作に合わせた初期化処理を追加した上で実装ソースファイルを生成することができる。   As a result, the mounting source file should be generated after adding initialization processing suitable for operations such as power-on initialization of the controller in the motor drive system, initialization when the motor is stopped, and initialization when the inverter is stopped. Can do.

なお、前記モデル作成プログラム31,前記モデル動作プログラム32,前記ソースコード生成プログラム33,前記ライブラリモデル34,前記スケーリング管理35,前記パッケージング36は、記憶装置25に対して読み出し/書き込みを行うことができる。   The model creation program 31, the model operation program 32, the source code generation program 33, the library model 34, the scaling management 35, and the packaging 36 may read / write from / to the storage device 25. it can.

また、本組み込みコントローラ開発ツールを用いて機器の開発を行えば、物理現象の再現や組み込みコントローラの動作を再現することができるため、信頼性の高い機器を製作することができる。   In addition, if the device is developed using the embedded controller development tool, the physical phenomenon can be reproduced and the operation of the embedded controller can be reproduced. Therefore, a highly reliable device can be manufactured.

また、本組み込みコントローラ開発ツールを用いてモータドライブシステムの開発を行えば、モータの複雑な挙動に対するコントローラの反応を再現することができるため、より良好なコントローラの開発が可能になり、信頼性の高いモータドライブシステムを開発することができる。   In addition, if a motor drive system is developed using this built-in controller development tool, the controller's response to the complex behavior of the motor can be reproduced, making it possible to develop a better controller and improve reliability. High motor drive system can be developed.

なお、モータドライブシステムには、モータを使って冷媒を循環するルームエアコンやパッケージエアコンや冷蔵庫やクリーナーやポンプ,電気自動車,燃料電池自動車ハイブリッド自動車などがある。   Motor drive systems include room air conditioners, packaged air conditioners, refrigerators, cleaners, pumps, electric vehicles, fuel cell vehicles, and hybrid vehicles that use a motor to circulate refrigerant.

1 制御設計
2 制御シミュレーションモデル構築
3 オートコーディング
4 実装ソースファイル
5 実装
6 ソフト検証
7 制御検証
8 制御ソフト開発環境
8A ライブラリモデル
8B スケーリング管理
8C パッケージング
22 ディスプレイ
23 CPU
24 入力装置
25 記憶装置
26 RAM
27 ROM
31 モデル作成プログラム
32 モデル動作プログラム
33 ソースコード生成プログラム
34 ライブラリモデル
35 スケーリング管理
36 パッケージング
DESCRIPTION OF SYMBOLS 1 Control design 2 Control simulation model construction 3 Autocoding 4 Implementation source file 5 Implementation 6 Software verification 7 Control verification 8 Control software development environment 8A Library model 8B Scaling management 8C Packaging 22 Display 23 CPU
24 input device 25 storage device 26 RAM
27 ROM
31 Model creation program 32 Model operation program 33 Source code generation program 34 Library model 35 Scaling management 36 Packaging

Claims (9)

モデル動作プログラムおよびソースコード生成プログラムに対応したモデルで構成されるライブラリモデルと、
固定小数点あるいは浮動小数点といったスケーリング情報を管理するためのスケーリング管理情報と、
前記モデルにおける値を初期化する初期化処理を行うための複数の初期値情報と、
前記モデルのパス情報、前記初期値情報および前記ライブラリモデルのストレージクラス情報を含むパッケージング情報と、
を記憶部に有するコンピュータに、
前記ライブラリモデルと、前記スケーリング管理情報と、前記初期値情報とにおける各情報を、前記モデル間の情報の入出力関係を示す制御モデルに反映させる処理と、
前記制御モデルを基に、コード生成を行うことによって、中間のソースコードであるオートソースコードを生成させる処理と、
前記パッケージング情報を前記生成されたオートソースコードに付加することで、前記オートソースコードを有するソースファイルを生成するパッケージングの処理を行わせるためのプログラムであるコントローラ開発ツール。
A library model composed of models corresponding to the model operation program and the source code generation program;
Scaling management information for managing scaling information such as fixed point or floating point,
A plurality of initial value information for performing an initialization process for initializing values in the model;
Packaging information including path information of the model, the initial value information and storage class information of the library model;
In a computer having a storage unit,
A process of reflecting each information in the library model, the scaling management information, and the initial value information in a control model indicating an input / output relationship of information between the models;
A process for generating an auto source code that is an intermediate source code by performing code generation based on the control model;
A controller development tool which is a program for performing packaging processing for generating a source file having the auto source code by adding the packaging information to the generated auto source code.
請求項1に記載のコントローラ開発ツールにおいて、
前記コンピュータに、
入出力部を介して、出力信号の符号有り・無しに関する情報が入力されると、当該出力信号の符号有り・無しに関する情報を前記モデルに反映させる処理を行わせるためのプログラムであるコントローラ開発ツール。
The controller development tool according to claim 1 ,
In the computer,
A controller development tool that is a program for performing processing to reflect the information on the presence / absence of the sign of the output signal in the model when the information on the presence / absence of the sign of the output signal is input via the input / output unit .
請求項1に記載のコントローラ開発ツールにおいて、
前記コンピュータに、
入出力部を介して、出力信号のスケーリング名称が入力されると、当該スケーリング名称に関する情報を前記モデルに設定させるためのプログラムであるコントローラ開発ツール。
The controller development tool according to claim 1 ,
In the computer,
When a scaling name of an output signal is input via an input / output unit, a controller development tool that is a program for causing the model to set information related to the scaling name.
請求項に記載のコントローラ開発ツールにおいて、
前記コンピュータに、
前記入出力部を介して、出力信号のスケーリングに関する情報が設定されると、当該設定されたスケーリングに関する情報と、前記スケーリング名称とを対応付けて前記記憶部に格納させるためのプログラムであるコントローラ開発ツール。
In the controller development tool according to claim 3 ,
In the computer,
Controller development that is a program for storing information related to the set scaling and the scaling name in the storage unit when information about scaling of the output signal is set via the input / output unit tool.
請求項に記載のコントローラ開発ツールにおいて
前記コンピュータに、
出力信号のスケーリング名称を選択させるためのプルダウンを表示部に表示させるためのプログラムであるコントローラ開発ツール。
The controller development tool according to claim 3 , wherein the computer includes:
A controller development tool that is a program for displaying a pull-down menu for selecting the scaling name of the output signal on the display unit.
請求項に記載のコントローラ開発ツールにおいて、
前記コンピュータに、
選択されたスケーリング名称に対応している前記スケーリングに関する情報を前記表示部に表示させるためのプログラムであるコントローラ開発ツール。
The controller development tool according to claim 5 ,
In the computer,
A controller development tool which is a program for causing the display unit to display information on the scaling corresponding to the selected scaling name.
請求項1に記載のコントローラ開発ツールにおいて、
前記コンピュータに、
入出力部を介して設定されたスケーリング名称と、符号有り・無しと、ビット長と、スケーリング値と、に関する情報を前記モデルに設定させるためのプログラムであるコントローラ開発ツール。
The controller development tool according to claim 1 ,
In the computer,
A controller development tool which is a program for causing the model to set information related to the scaling name, signed / unsigned, bit length, and scaling value set via the input / output unit.
請求項1に記載のコントローラ開発ツールにおいて、
前記コンピュータに、
前記モデルに設定されている数値名称と、数値と、スケール名称と、スケール値と、説明情報と、ストレージクラスと、モデルパスの情報と、を前記モデルから取り出させるためのプログラムであるコントローラ開発ツール。
The controller development tool according to claim 1 ,
In the computer,
A controller development tool that is a program for causing a numerical name, numerical value, scale name, scale value, description information, storage class, and model path information set in the model to be extracted from the model .
請求項1に記載のコントローラ開発ツールにおいて、
前記ライブラリモデルは、前記ソースコードを生成可能なブロックである前記モデルの集合体であることを特徴とするコントローラ開発ツール。
The controller development tool according to claim 1 ,
The controller development tool, wherein the library model is a collection of the models that are blocks capable of generating the source code.
JP2011255047A 2011-11-22 2011-11-22 Controller development tool Active JP5530417B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011255047A JP5530417B2 (en) 2011-11-22 2011-11-22 Controller development tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011255047A JP5530417B2 (en) 2011-11-22 2011-11-22 Controller development tool

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008169764A Division JP5011221B2 (en) 2008-06-30 2008-06-30 Controller development tool and equipment with motor drive system developed using it

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2014035387A Division JP6085264B2 (en) 2014-02-26 2014-02-26 Controller development tool

Publications (2)

Publication Number Publication Date
JP2012074066A JP2012074066A (en) 2012-04-12
JP5530417B2 true JP5530417B2 (en) 2014-06-25

Family

ID=46170082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011255047A Active JP5530417B2 (en) 2011-11-22 2011-11-22 Controller development tool

Country Status (1)

Country Link
JP (1) JP5530417B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH086777A (en) * 1994-06-23 1996-01-12 Hitachi Ltd System and method for developing information control system
JP3912278B2 (en) * 2002-12-20 2007-05-09 株式会社日立製作所 Embedded controller and embedded controller development tool
JP2005222221A (en) * 2004-02-04 2005-08-18 Hitachi Ltd Integrated controller development tool, integrated controller and integrated controller development process
JP4727291B2 (en) * 2005-05-12 2011-07-20 ディエスピーテクノロジ株式会社 Block diagram type simulation model creation device, real-time simulation execution device, and library

Also Published As

Publication number Publication date
JP2012074066A (en) 2012-04-12

Similar Documents

Publication Publication Date Title
US20130204602A1 (en) Simulation apparatus and method for verifying hybrid system
US10860298B2 (en) Method and system for editing a block diagram model
JP2008084121A (en) Simulation system and simulation method
JP2005078243A (en) Microcomputer resource consumption estimating program, microcomputer resource consumption estimating device, and program generating method
US20100235809A1 (en) System and method for managing a model-based design lifecycle
JP2009294846A (en) Test case generator, and test case generation program and method
JP5589919B2 (en) Design support device, design support program
JP5011221B2 (en) Controller development tool and equipment with motor drive system developed using it
CN110489401B (en) Method and device for deploying database objects
JP5530417B2 (en) Controller development tool
JP2009075965A (en) Software development method and software development device
JP6085264B2 (en) Controller development tool
JP4870956B2 (en) Embedded program generation method, embedded program development system, and information table section
TW201327211A (en) System and method for automatically generating measuring program codes
US8850386B2 (en) Method for estimating resource consumption in the generation of a control device program code
US8805674B2 (en) Electronic device and method for supporting multiple languages in image measurement programs
US10223077B2 (en) Determination of signals for readback from FPGA
CN103927207A (en) Software acceleration method and device
US10922463B1 (en) User dialog-based automated system design for programmable integrated circuits
JP2020144509A (en) Automatic code generation method and automatic code generating program
JP2007018313A (en) Circuit design program, circuit design device and circuit design method
JP2011165051A (en) Development support device, method and program
WO2021181586A1 (en) Simulation device and simulation program
CN117391002B (en) IP core extension description method and IP core generation method
CN109716304B (en) Method and system for testing mixed instruction architecture

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130312

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130513

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20131126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140226

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20140228

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20140320

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140418

R150 Certificate of patent or registration of utility model

Ref document number: 5530417

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150