バックナンバーはこちら
https://www.simulationroom999.com/blog/model-based-of-minimum-backnumber/
はじめに
いろいろ準備は整ったので今回は動かす!
CAPLのブレークポイント、ステップ実行の話。
送信周期はプロットで見ることができるし、
CAN回線モニタで確認することもできる。
などなどについて。
登場人物
博識フクロウのフクさん
![](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/指差しフクロウ.png)
イラストACにて公開の「kino_k」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=iKciwKA9&area=1
エンジニア歴8年の太郎くん
![](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者01アップ.png)
イラストACにて公開の「しのみ」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=uCKphAW2&area=1
CAPLのデバッグ
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者02アップ.png)
とりあえず準備は整って、あとは動かすだけ?
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/指差しフクロウ.png)
うん。
まぁシステム変数の更新の正しさは確認済みなんで、
あとはCAPLが正常に動いていれば問題無しなんだけどね。
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/「技術者a」13アップ.png)
CAPLもプログラミング言語なんだよね?
ブレークポイントはったり、ステップ実行したりはできないの?
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/お休みフクロウ.png)
一応できるよ。
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/「技術者a」13アップ.png)
一応?なんか制限があるの?
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/指差しフクロウ.png)
うん。
シミュレーションバスの時しか使えない。
実バスにするとブレークポイントは強制的に無効化される。
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者02アップ.png)
と、言うことは、実バスで試す前にシミュレーション状態で可能な限りデバッグは終わらせておいた方が良さそうだね。
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/指差しフクロウ.png)
ブレークポイントの貼り方はCAPLブラウザ上でソースコードの左側をクリックすればOK。
![CAPLブラウザ、ブレークポイント](https://www.simulationroom999.com/blog/wp-content/uploads/2020/06/02_ブレークポイント-1024x588.png)
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者02アップ.png)
あー良くあるパターンだ。
これだったら直感的に使えそう。
動作させる
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者01アップ.png)
じゃー動作させてしてみる。
![CANoeシミュレーション結果](https://www.simulationroom999.com/blog/wp-content/uploads/2020/06/03_動作結果-1024x661.png)
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者a」05アップ.png)
うん。動きは正常そうだ。
周期はどうみたらよいかな?
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/お休みフクロウ.png)
波形を拡大すると送信したタイミングでプロットされているから、
それで確認するか、
CAN回線モニタで周期を見るか、
だね。
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者02アップ.png)
プロットの方で見てみよう。
![CANoeシミュレーション結果詳細](https://www.simulationroom999.com/blog/wp-content/uploads/2020/06/04_プロット-1024x453.png)
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者a」05アップ.png)
周期も大丈夫そう。
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/指差しフクロウ.png)
あとは、いろいろデータ取りして、
テストベンチで使用する上で問題無いか確認してもらった方が良いね。
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/「技術者a」10アップ.png)
確かに、いきなり繋いでみるってもの怖いもんね。
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/お休みフクロウ.png)
じゃ、あとはうまくやりな。
![太郎くん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/技術者01アップ.png)
うん。いろいろありがとう。
まとめ
![フクさん](https://www.simulationroom999.com/blog/wp-content/uploads/2020/05/指差しフクロウ.png)
まとめだよ。
- CAPLもブレークポイント、ステップ実行などのデバッグ機能は保有している。
- ただし、シミュレーションバスの時だけ可能。
- 送信周期はプロットで見るか、CAN回線モニタで確認できる。
バックナンバーはこちら
コメント