How to use SimulinkRealTime.target/getsignal on bus signal?
5 views (last 30 days)
Show older comments
The documentation for simulink realtime `getsignal` https://www.mathworks.com/help/slrealtime/api/slrealtime.target.getsignal.html says that the output can be a struct if the signal is a bus.
I made a nonvirtual bus signal. See screenshot below.
The signal is not in the list of signals when I use `tg.ShowSignals = 'on';` and display `tg`. See attached file output.txt
I have tried attaching a gain block to the bus output. The gain block signal is visible and I can call getsignal on it, but getsignal returns a single double which seems to be the first of the 6 bus elements. I want the all 6 elements of my bus in one struct. (I want to use a bus signal and getsignal the bus signal because calling getsignal 6 times is too slow for the matlab program I am trying to write.)
Thanks in advance for any help.
Answers (0)
See Also
Categories
Find more on Target Computer Setup in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!