北陽電機さんのUBGセンサーをmatlabでコントロールするには?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Daichi Saitou
am 1 Jul. 2019
Kommentiert: Daichi Saitou
am 7 Jul. 2019
URGファミリードライバー
というのを見つけて、そのままコピーして作動させようとしたができなかった。反応は出るが、エラーが出る。matlabに触れるのはほとんど初めてなので、プログラミングを読み解くことも容易ではありません。その為、何が良くて何が悪いのか判断が難しいです。誰か助けて!
実行1回目に出たエラー:
「警告: 読み取りに失敗しました: A timeout occurred before the Terminator was reached.
'serial' unable to read all requested data. For more information on possible reasons, see Serial Read Warnings. 」
「関数または変数 'Scan_GUI' が未定義です。
エラー: run (line 38)
Scan_GUI 」
実行2回目に出たエラー:(実行1回目に出たエラーはもう出ない)
「エラー: serial/fopen (line 72)
開くことができません: Port: COM4 is not available. No ports are available.
Use INSTRFIND to determine if other instrument objects are connected to the requested device.」
「エラー: run (line 20)
fopen(lidar);」
マジで分からん・・・
0 Kommentare
Akzeptierte Antwort
Kazuya
am 1 Jul. 2019
これですかね・・?
実際に試されたこと、エラーメッセージなどあるとどなたか分かる人がいるかもしれません・・。
3 Kommentare
Kazuya
am 2 Jul. 2019
Scan_GUI のファイルがないことがエラーの原因ですが
からダウンロードした run.m を実行されているのであれば、Scan_GUI の箇所を main_GUI に書き換えれば、とりあえず「関数または変数 'Scan_GUI' が未定義です。」のエラーは避けられそうです。。代わりに main_GUI があるので、入れ替えてみれば・・というレベルの推測ですが。
ダウンロードページに「Edit Run.m with the correct COM Port to use this file. 」とあるので、冒頭の Warning に関してはポート番号が関係しているかもしれません。
該当箇所:run.m 内の
lidar=serial('COM6','baudrate',115200);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!