フィルターのクリア

How to disable termination character while setting up serial object?

12 ビュー (過去 30 日間)
Abhilash Sukumari
Abhilash Sukumari 2019 年 7 月 26 日
コメント済み: Guillaume 2019 年 7 月 29 日
I have to establish with a serial communication device that uses the following properties:
baud = 115200, parity = none, timeout = 500ms, termination char = None, stopbits = 1.
The matlab documentation provides all property values except that on how to disable the termination character.
Any ideas?

採用された回答

Guillaume
Guillaume 2019 年 7 月 26 日
The matlab documentation provides all property values except that on how to disable the termination character.
How about the 'Terminator' property?
  2 件のコメント
Abhilash Sukumari
Abhilash Sukumari 2019 年 7 月 29 日
This is to be used only when you want to specify a termination character. What if you are dealing with a fixed message serial protocol that doesn't have a termination character ?
Guillaume
Guillaume 2019 年 7 月 29 日
s.Terminator = '';
%or
s.Terminator = [];
seems to work fine in that it does not throw an error even if you write to the serial port. I don't have a device connected to my serial port to check that it actually does what you want.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by