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

조회 수: 3 (최근 30일)
Max Baeten
Max Baeten 2016년 2월 4일
답변: Max Baeten 2016년 2월 10일
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

채택된 답변

Max Baeten
Max Baeten 2016년 2월 10일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Troubleshooting in Simulink Real-Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by