Data write block goinf to default value while not being written
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!