Clear Filters
Clear Filters

How to acces ALL signals in a simulink real time target model?

4 views (last 30 days)
Hi all,
I have a problem when accessing signals and parameters on a Simulink real time target (speedgoat system). If I connect with tg = slrt; tg.ShowSignals = 'on', A link to the target is created and a list of signals and parameters is shown.
I can fetch the parameter and signals IDs, request values and modify parameters. The only problem is that not all signals of the model are shown. I did find a workaround by adding a target scope to the signals that did not show in the list. However I want a better solution since adding a target scope will result in unnecessary workload for the target pc.
How can I make sure that all signals, are shown in the tg list? Or alternatively How can I make sure that a particular signal is shown in the tg list.
Regards

Accepted Answer

Max Baeten
Max Baeten on 10 Feb 2016
ANSWER BY KEV HEATON
Hi max,
you are right, when you compile a Simulink model MatLab does perform some optimisation on the generated code which can in some cases remove the ability to monitor a signal.
An easy way around this is to highlight the signal in Simulink as a 'Test Point'. Right click on the signal in the Simulink window, select 'Properties' and check the 'Test Point' box. A blue 'lollipop' will appear on the signal to show that it is now a test point.
When you compile the model and do tg.ShowSignals = 'On', it should now be present in the list.
Regards,
Kev

More Answers (0)

Categories

Find more on Real-Time Simulation and Testing 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!