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

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Max Baeten
Max Baeten el 10 de Feb. de 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

Más respuestas (0)

Categorías

Más información sobre Troubleshooting in Simulink Real-Time en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by