Using a bus input signal as a timeseries (to load from workspace)
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a bus structure which is as follows:
BUS A
- ELEMENT - a (another bus) of dimension 2
- aa1 (buselement of a)
- aa2 (buselement of a)
- aa3 (buselement of a)
I combined two input signals testa(1) and testa(2) using vector concatenator block and used a bus creator block after that to create my input signal (of type BUS A). What I want to do is to use this input signal in time series so that my input signal is the 'value' and I will supply a timeseries vector to comply. Ideally, it will be:
var.time=my_timeseries_var;
var.signals.values=my_input_bus_signal;
var.signals.dimensions=1;
I am getting an error that it is not possible to use a bus signal only logical, numeric, and enumerated types are allowed. Can I not use a bus input in a timeseries? I need to do operations such as change input value in the middle of my running simulation, etc. and this is why is need to supply time series input so that specific sample/samples can be altered. Is there any solution?
KR,
0 个评论
回答(1 个)
Brandon Trombley
2014-5-14
You can't use a Bus Type in a TimeSeries or the Import/Export blocks associated with it. The Data Store blocks will allow you to use a Bus Type in this way. It's easiest if you skip the bus creator and just assign the test* signals to a Data Store Write and then access that signal later using a Data Store Read. Declaring the object as a Simulink.Signal doesn't hurt if you want full access.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!