Clear Filters
Clear Filters

How to use SimulinkRe​​alTime.ta​r​get/gets​ig​nal on bus signal?

5 views (last 30 days)
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)

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!