3

I have a Simulink model from which I generate C++ to Visual Studio.

The Simulink model has a scope block at the end of the calculations, which gets two signals whose values interest me in C++

Now I have searched the C++ Code for these two signals, but only find signals from intermediate calculations, not the signals for the scope.

How can I find them?

MerklT
  • 803
  • 7
  • 18
  • Depending on which code generation target you have used, adn whether those signals are being logged, then they may not appear in the generated code. – Phil Goddard Jun 25 '19 at 04:23
  • 1
    @PhilGoddard thanks, the **System target file** is `grt.tlc` with `C++` for Visual Studio. Is there any way to ensure that the signals appear in the generated code? – MerklT Jul 01 '19 at 09:00
  • I haven't used `grt` for a long time, but my memory (which could be faulty) is that signals going into *viewers* (such as the `Scope` block) get ignored during code generation unless their data is being logged. So you should either log the data, or send it to an `Outport`. – Phil Goddard Jul 01 '19 at 23:35

0 Answers0