Instrument Control Toolbox 内のSerial Receive, Serial Configurat​ionを用いてUSB​からのシリアル出力結​果を各データビットご​とに振り分けるには、​どのブロックを使用す​るとよいですか?

4 vues (au cours des 30 derniers jours)
kazuya h
kazuya h le 26 Avr 2022
Commenté : kazuya h le 28 Avr 2022
シリアル通信の出力結果をScopeによって表示することまでは出来たのですが、各データビットを周期的に観測するためにデータビットごとの出力結果を出したいです。

Réponse acceptée

Toshinobu Shintai
Toshinobu Shintai le 26 Avr 2022
Serial Receiveブロックから出力されるデータは配列になっていると思いますので、「Demux」ブロックを使って要素ごとに展開できます。
各要素がuint8型であれば、「Integer to Bit Converter」ブロックで整数型の値から各ビットを展開できます。
  1 commentaire
kazuya h
kazuya h le 28 Avr 2022
ありがとうございます。
いただいたアドバイスで解決できました。

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Direct Interface Communication in Simulink dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!