1 / 15

 マスクデータ( VT 表示用画面データ)の                       解説と実践

実用技術開発事業「通信制御共通化技術の開発」ワークショップ                        平成 24 年 11 月 20-21 日,芽室研究拠点. Motobayashi. 12M - 00.  マスクデータ( VT 表示用画面データ)の                       解説と実践. Source : www.isobus.net. (独) 農研機構・中央 農業総合研究 センター 元林 浩 太. 概要. Motobayashi. 12M - 01. VT ( Virtual Terminal 、 仮想端末)とは、

talmai
Télécharger la présentation

 マスクデータ( VT 表示用画面データ)の                       解説と実践

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 実用技術開発事業「通信制御共通化技術の開発」ワークショップ                       平成24年11月20-21日,芽室研究拠点 Motobayashi 12M -00  マスクデータ(VT表示用画面データ)の                      解説と実践 Source : www.isobus.net (独)農研機構・中央農業総合研究センター 元林浩太

  2. 概要 Motobayashi 12M-01 VT(Virtual Terminal、仮想端末)とは、  ・ISOBUSで用いる唯一のユーザーインターフェース.  ・ISO11783-6で仕様が詳細に決められている.  ・グラフィックディスプレイとソフトキーを有する.  ・画面の解像度は、200x200、240x240、320x320、480x480のいずれか.  ・接続した作業機等(WorkingSet)に応じた操作画面が表示される. 目的 : VTに何かを表示する “何か”とは、  ・接続された作業機等に対応した操作画面(マスク).  ・マスクには、データキーマスク、ソフトキーマスク、アラームマスク等がある.  ・マスクは、オブジェクトと呼ばれる個々の要素で構成される. ・WorkingSetを記述するオブジェクトの集合体を、ObjectPoolという. “表示”とは、  ・作業機バスに作業機が接続されると、作業機ECUがアドレスクレームを行い、   作業機ECUからVTにObjectPoolがロードされる. ・画面上に作業機の情報が表示されるとともに、必要な設定値等が入力可能となる. 12H08

  3. 使用する開発ツール Motobayashi 12M-02 「Pool Edit」  ・ ISO11783準拠のVirtual Terminalのための、GUI作成用のエディタ.  ・ フィンランドのHelsinki University of Technology(現Aalto University)が開発.  ・ オープンソース(GPL) (→Web上でダウンロード可能)  ・ Javaで記述され、WindowsとLinuxでテストされた.  ・ GUIの保存と編集に、XML(ExtensibleMarkup Language)を使用.  ・ 使用するXMLのフォーマットは、「IsoAgLib」フォーマットに一部変更を加えた.  ・ 作業機制御アプリケーションは、このXMLを読みこみ、ISO11783用バイナリ   表現に変換し、VTにロードする.                                   (以上は、PoolEditのUser’s Manualより引用)  ・ ただし、開発元では開発終了 (→意外とバグが多い) ・ ここでは、オリジナルの「PoolEdit」を一部修正して使用する.  ・ 参考資料は、User’sManual(Aalto Univ.からダウンロード)、 ISO11783-6 12M02

  4. VTに表示するまでの流れ Motobayashi 12M-03 マスクのプラン(pptなど) 本稿での説明 Object Poolエディタ “PoolEdit” GUIによりObjectPoolを編集 Objectpool.XML(一時保存ファイル) Objectpool_export.XML XMLパーサ “pooleditparser” XML形式から構文変換(ISO11783-6) Objectpool.h Objectpool.bin ECU開発支援ライブラリ“AgriBusStdLib” ライブラリに加筆 MPLAB-X等の開発環境 書き込み ECU プラグイン&ロード Virtual Terminal 12H11-B

  5. 供試システム(例)の外観 Motobayashi 12M-04 ISO11783 VT (”Comfort Terminal”) Note PC (WindowsXp) 書込み機 (“PICkit2”) VT用Adapter (ピン配置変更) ECU (“NaroCanBoard”) DC12V Terminator Terminator CAN 12M04 12H

  6. “PoolEdit”の操作画面 Motobayashi 12M-05 オブジェクト・ツールバー オブジェクトの外観 オブジェクトの属性値 ツリー表示 12H12

  7. “PoolEdit”の操作画面 Motobayashi 12M-06 オブジェクトの種類 オブジェクト・ツールバー オブジェクトの属性(例) オブジェクトの外観 オブジェクトの属性値 ツリー表示 12H12

  8. “PoolEdit”の基本操作 Motobayashi 12M-07 起動 pooledit.jar をクリック (配布USBメモリの ”pooledit_NARO2012A” フォルダに収録)   メニューから、 File → New 又は Open(例えば ”sample.xml” を指定) オブジェクトを配置   オブジェクトボタンを、オブジェクト・ツールバーからツリー表示へドラッグ   配置したオブジェクトの属性値を変更      (座標、高さ、幅、初期値、色、親/子オブジェクトetc、OjbectTypeによって異なる)   必要に応じてオブジェクトの修正      (コピー、重ね順の変更、名称変更etc)   ファイルの保存   メニューから、 File → Save as → 任意のファイル名(.xmlファイル)   メニューから、 File → Export to Embedded XML → 任意のファイル名 (Pooleditparserに引き渡すxmlファイル) 12M07

  9. オブジェクトの階層(working set) Motobayashi 12M-08 接続デバイス一覧に表示される部分 WorkingSetとは ISO11783ネットワーク上の一つの機能単位  概ね、ひとつのECUに相当 datamask、softkeymask等も含まれる 12M08

  10. オブジェクトの階層(softkey mask) Motobayashi 12M-09 画面切り替えや指定入力に用いるSoftKey (5個以上の場合は順次下に列挙される) 12M09

  11. オブジェクトの階層(data maskの主要部分) Motobayashi 12M-10 表示&入力を行うdatamaskの主要部分 12M10

  12. 最後の「おまじない」 Motobayashi 12M-11 パーサ「pooleditparser」による変換 PoolEditで作成したXMLファイル 変換後の出力ファイル ■C.形式での出力 pooleditparser.exe filename_export.xmlfilename.h–d=400–sh=80 –sw=120 -table ■bin形式での出力 pooleditparser.exe filename_export.xmlfilename.bin–d=400 –sh=80 –sw=120 12M11

  13. 出力ファイル例 Motobayashi 12M-12 unsigned char *pool = { <?xml version="1.0" encoding="UTF-8"?><objectpool dimension="200" fix_bitmap_path="images\" sk_height="32" sk_width="60" std_bitmap_path="images\"> <workingsetbackground_colour="white" id="256" name="workingset" selectable="yes" use="designator"> <include_object id="258" name="datamask" role="active_mask"/> <container height="200" hidden="no" id="257" name="container0" pos_x="0" pos_y="0" use="designator" width="200"/> </workingset> <datamaskbackground_colour="187" id="258" name="datamask" use="mask"> <include_object id="275" name="softkeymask" role="soft_key_mask"/> <container height="200" hidden="no" id="259" name="container0_SpeedMeter0" pos_x="0" pos_y="0" use="mask" width="200"> <ellipse ellipse_type="closed" end_angle="0" height="151" id="260" name="ellipse0" pos_x="23" pos_y="15" start_angle="0" use="mask" width="151"> <include_object id="280" name="black" role="fill_attributes"/> <lineattributes id="261" line_art="1111111111111111" line_colour="17" line_width="1" name="black1" role="line_attributes" use="mask"/> </ellipse>    (中略) <meter arc_and_tick_colour="30" block_col="0" block_row="0" border_colour="olive" end_angle="135" id="271" max_value="90" min_value="0" name="basicmeter1" needle_colour="maroon" number_of_ticks="10" options="clockwise+ticks" pos_x="30" pos_y="21" start_angle="0" use="mask" value="012" width="138"/> </container> <outputstringbackground_colour="227" height="12" horizontal_justification="middle" id="272" language="" length="11" name="label0" options="transparent" pos_x="2" pos_y="168" use="mask" value="WHEEL SPEED" width="196"> <include_object id="278" name="black8x12" role="font_attributes"/> </outputstring> </datamask> <softkeymaskbackground_colour="white" id="275" name="softkeymask" use="designator"/> <lineattributes id="276" line_art="1111111111111111" line_colour="black" line_width="1" name="lineattributes"/> <fontattributesfont_colour="52" font_size="6x8" font_style="" font_type="latin1" id="277" language="" name="black6x9" use="mask"/> <fontattributesfont_colour="maroon" font_size="8x12" font_style="" font_type="latin1" id="278" language="" name="black8x12" use="mask"/> <fontattributesfont_colour="52" font_size="12x16" font_style="" font_type="latin1" id="279" language="" name="black12x16" use="mask"/> <fillattributesfill_colour="grey" fill_type="fillcolour" id="280" name="black" use="mask"/> </objectpool> <.XMLファイルの例> unsigned char *pool = { 1, 1, 3, 200, 0, 200, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 5, 1, 24, 17, 1, 255, 255, 0, 4, 1, 15, 5, 1, 151, 0, 151, 0, 0, 0, 0, 24, 1, 0, 7, 1, 25, 2, 7, 255, 255, 0, 8, 1, 24, 23, 1, 255, 255, 0, 6, 1, 15, 8, 1, 141, 0, 141, 0, 0, 0, 0, 7, 1, 0, 9, 1, 11, 16, 0, 8, 0, 1, 21, 1, 1, 255, 255, 1, 1, 0, 48, 0, 10, 1, 11, 16, 0, 8, 0, 1, 21, 1, 1, 255, 255, 1, 2, 0, 51, 48, 0, 13, 1, 11, 30, 0, 8, 0, 1, 21, 1, 1, 255, 255, 1, 4, 0, 107, 109, 47, 104, 0, 3, 1, 3, 200, 0, 200, 0, 0, 9, 0, 4, 1, 23, 0, 15, 0, 6, 1, 28, 0, 20, 0, 9, 1, 91, 0, 136, 0, 10, 1, 44, 0, 87, 0, 11, 1, 91, 0, 37, 0, 12, 1, 136, 0, 87, 0     (中略) 24, 1, 25, 2, 8, 255, 255, 0 }; #define POOL_SIZE 437 #define workingset 256 #define datamask 258 #define softkeymask 275 #define lineattributes 276 #define black6x9 277 #define black 280 <.hファイルの例> 12H13

  14. “MPLAB-XIDE”の操作画面 Motobayashi 12M-13 ECU用ライブラリ“AgriBusStdLib” <ObjectPool記述部分を.hファイルから移植> 12H14 12H

  15. Object Poolの表示結果 Motobayashi 12M-14 Virtual Terminal (Comfort Terminal) CAN (作業機バス) 作業機バス用 標準コネクタ ECU (NaroCanBoard) 12H16 12H

More Related