フィルターのクリア

making gui for serial port interfacing

2 ビュー (過去 30 日間)
pradeep kumar
pradeep kumar 2014 年 8 月 12 日
コメント済み: Joakim Magnusson 2014 年 8 月 13 日
i am making gui for serial port interfacing, how can i create serial port object by taking com port number by user in edit text box.
port=serial(COM1) it is working. but i want user to enter port number in edit text box
port=serial(get(handles.edit_text_box,'string')); not working

回答 (1 件)

Joakim Magnusson
Joakim Magnusson 2014 年 8 月 12 日
I think you get a string but you need a num. Maybe try "port=serial(str2num(get(handles.edit_text_box,'string')));" ?
  2 件のコメント
pradeep kumar
pradeep kumar 2014 年 8 月 12 日
thanks for reply but in port=serial('COM6'); COM6 should be string, i have try all possible experiments but no success.
error is --Invalid PORT specified.
Joakim Magnusson
Joakim Magnusson 2014 年 8 月 13 日
Ah sorry then, i guess your serial port is not in use? Because then you cant connect the serial port object to the device i think.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by