フィルターのクリア

How can I send no data with the Simulink Arduino serial transmit block?

2 ビュー (過去 30 日間)
Stuart Snow
Stuart Snow 2016 年 9 月 26 日
回答済み: Multiplexer 2017 年 7 月 25 日
Apologies if I've missed something obvious -
I'm experimenting with the Arduino blockset in Simulink, sending serial data from an Arduino Uno back to my PC. I can transmit data just fine, but how do I not send anything? If I use a zero as the input to the Serial Transmit block then the Arduino just sends a zero over the serial port every time step.
I tried using a function call or an enabled subsystem to gate the signal but the output remains at its previous level when the subsystem is disabled, so the serial keeps sending the same character. There must be a simple way to do this, but I haven't found it yet.

回答 (1 件)

Multiplexer
Multiplexer 2017 年 7 月 25 日
This is how the block is designed to be. Its meant to send 0 when there is no data in serial buffer. Even the Instruments Control block has no option to "not transmit anything".

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by