Clear Filters
Clear Filters

Data write block goinf to default value while not being written

1 view (last 30 days)
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

Answers (1)

Keshav
Keshav on 22 Aug 2023
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!

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!