making gui for serial port interfacing
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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
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 Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!