北陽電機さんのUBG​センサーをmatla​bでコントロールする​には?

5 visualizaciones (últimos 30 días)
Daichi Saitou
Daichi Saitou el 1 de Jul. de 2019
Comentada: Daichi Saitou el 7 de Jul. de 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);」
マジで分からん・・・

Respuesta aceptada

Kazuya
Kazuya el 1 de Jul. de 2019
これですかね・・?
実際に試されたこと、エラーメッセージなどあるとどなたか分かる人がいるかもしれません・・。
  3 comentarios
Kazuya
Kazuya el 2 de Jul. de 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);
Daichi Saitou
Daichi Saitou el 7 de Jul. de 2019
main_GUIにしたら出来ました!ありがとうございます!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 起動と終了 en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!