Data write block goinf to default value while not being written

2 ビュー (過去 30 日間)
CM Antony
CM Antony 2023 年 8 月 10 日
回答済み: Keshav 2023 年 8 月 22 日
I have 2 write ports connected to two differecnt if subsystems and the are supposed to write different values to the write block when the conditions are satisfied .However even when the condition is satisfied it is not writing the value to the memory and it is in its default value of 0 and the if condition is is also working as i have attached a display port to the if action block and that does pass on the value 1 to the data write block but however when i read the data it is 0 and for a very short period of time .How do i fix this

回答 (1 件)

Keshav
Keshav 2023 年 8 月 22 日
Hi,
I understand that you are experiencing for a brief period of time where the Simulink block outputs 0, even though the if condition is functioning correctly and passing a value of 1 to the data write block.
This issue could be due to the initial value being set as 0 in your Simulink data write block. Consequently, when the signal hasn't reached the write block yet, it displays the initial value of 0 as the output.
Hope this helps!

カテゴリ

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

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by