from file simulink real time

2 次查看(过去 30 天)
schak
schak 2019-4-23
I am running a simulink model on a real time machine. I want to load a certain vector of signal values stored in a mat file and output them whenever a certain boolean flag is turned on. Basically everytime the boolean turns on due to some conditions I want the pre saved vector values output as a signal. Im doing this now by placing a from file block within an enabled subsystem which is enabled by the boolean flag. My mat file has two rows the first has time values 0:0.0001:0.01 (total of 10 ms) and my second row has corresponding signal values. However when I use this the signal output takes much longer than 10 ms although the signal values are correct. Do I have to specify the exact timestamps of the real time clock when these values should be read out? This is not possible since I dont know when certain conditions would occur to turn the boolean flag on. Is there a smarter way to do this? Thank you in advance

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by