I'm afraid it is impossible to connect multiple UST sensors to 1 pc without using switching hubs.
接続・距離データの連続取得方法を知りたいということですので、 一度urg_libraryのサンプルプログラムで動作を確認していただけますでしょうか。 "urg_library"フォルダの、\current\vs2017\cppにある "urg_cpp.sln"をvs2019で開くと、「プロジェクトの再ターゲット」 という画面が表示されますので、 Windows SDK→10.0 プラットフォーム ツールセット→v142 に設定してOKを押してください。 get_distanceというプロジェクトで接続と距離データ連続取得を行っていますので、 このプロジェクトをビルド・実行して確認してください。 以下のページにライブラリの説明が記載されていますので、参考にしてください。 http://urgnetwork.sourceforge.net/html_ja/library_sample_page.html
確認ですが、変数"i"はどこかで宣言されていますか? i スポット目の距離が300mm以下のときにコンソールに「近い」と出力したいということでしょうか。
センサから出力された距離データを加工する方法であれば、指定の距離値でフィルタリングすることで最大距離を短くすることができます。(if~elseで実装できると思います。) センサ本体を調整して最大距離を短くする、という話であれば残念ながらURG Libraryでは対応していません。
I think you have a hardware related problem. Please contact your nearest distributor or the support team with your details to info@hokuyo-aut.jp.
This sensor cannot recognize the objects moving too fast because of the specification of scan period(25ms). I'm afraid I can only advise you to reduce the speed of objects.
How about moving the objects closer to the sensor, if possible? The farther you move the object from the sensor, the less you can recognize small objects. For examlple, if the distance between UST-10LX and the object is 10m, the sensor may be unable to recognize the object whose length is less than about 43mm.
I want to know if the sensor is recognized by PC. You can check if you visit this page:https://sourceforge.net/p/urgnetwork/wiki/serial_en/ If the sensor is not recognized, and your PC is Windows OS, please try to do below. https://sourceforge.net/p/urgnetwork/wiki/driver_en/ (Win 7/8) https://sourceforge.net/p/urgnetwork/wiki/driver_win10_en/ (Win 10)