バックナンバーはこちら。
https://www.simulationroom999.com/blog/diagnostic-communication-backnumber/
はじめに
ISO-TPのシミュレーションをしよう。のシリーズ。
まずはVirtual CAN Busのセットアップから。
登場人物
博識フクロウのフクさん

イラストACにて公開の「kino_k」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=iKciwKA9&area=1
エンジニア歴8年の太郎くん

イラストACにて公開の「しのみ」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=uCKphAW2&area=1
Virtual CAN Busの準備

まずはVirtual CAN Busの手配だね。

Vector社が無償で公開しているって前回言ってたね。

具体的にはXLドライバライブラリに含まれている機能だね。
Vector社 XLドライバライブラリ

XLドライバライブラリ自体の本来の機能は
Vector社製の各種インターフェースの制御をするためのライブラリ群。
その一部の機能として「Virtual CAN Bus」が含まれているというイメージ。
Vector社のダウンロードセンターから「XL Driver Library」で探すと出てくると思うよ。
あと、「Vector Driver Setup」というのも必要になる。
ちなみにWindows限定なんで。

あ、出てきた。
これをダウンロードしてインストールすればOKだね。
Virtual CAN Busのインストール確認

まずはちゃんとVirtual CAN Busがインストールされているか確認してみようか。
コントロールパネルに「Vector Hardwear」ってのが追加されていると思う。
これを起動し、HarwareのところにVitual CAN Busが追加されていることを確認しよう。


うん。ちゃんとあるね。
Virtual CAN Busの動作確認

次は動作確認。
Windowsのスタートからの「すべてのプログラム」の中にVector XL Driver Libraryってのが増えていると思う。
この中にSampleってのがあって、そこにxlCANcontrolってアプリケーションがあるんでそれを起動。

起動したよ。

あれ?

<ERROR> on HW!
とかってエラーになってる。


あーたぶん、太郎くんの環境だと、
実際のVectorデバイスが繋がっていることを想定した構成になっているんだな。
さっきのコントロールパネルからのVector Hardwearで
xlCANcontrolに対して割り当てるデバイスを再指定してあげる必要があるかも。


これで再度、xlCANcontrolを起動してみて。

お、こんどはエラーにはならないね。
このSendってボタンを押せばいいのかな?

あ、なんか動いたっぽい。


じゃ、XLドライバとVirtual CAN BusのセットアップはOKかな。
まとめ

まとめだよ。
- Vector社の無償公開のXL Driver LibraryとVector Driver Setupをインストール。
- XL Driver Libraryの中にxlCANControlというアプリがあるんで、それによる動作確認が手っ取り早い。
- アプリ毎にチャンネルの割り当てができるので、コントロールパネルのVectorHardwareで割り当てをしておく必要がある。
バックナンバーはこちら。
コメント