How can I hide signals in simulink so that they do not show when using xPC Target.

9 次查看(过去 30 天)
Hi,
I am looking for a way to hide the unneeded signals from simulink, when the model is compiled to xPC target. We use xPC Target C-API with Target PC to connect, dowload and start the model. We also initialize logging through C-API, but the problem is that our models are very large and sometimes it is very hard or even impossible to find the exact signal that we want to log.
So is it possible to hide signals for example within specific subsystem in Simulink?

回答(1 个)

Rajiv Ghosh-Roy
Rajiv Ghosh-Roy 2014-3-31
There is no easy way to the exact thing you are looking for. You can play with the optimization options Block Reduction, Signal Storage reuse and the sub-options of Signal Storage reuse. These will remove some of the signals that would otherwise be there.
This may also remove some of the signals you are working with/wish to log. However, test-pointing those signals will prevent them from being removed.
It would be interesting also to find out the difficulties you are having with finding the exact signal: could you not use the exact name to find the identifier (e.g. using xPCGetSignalIdx? This function should do the searching for you no matter how large the signal list is.
  1 个评论
J H
J H 2017-2-28
Thanks for your help.
Sorry, but I have another question. I'm new to TCP/IP protocol.
How do I find my Simulink ipPort number?
If I want to use xPCGetSignalIdx(int port, const char *sigName) to get my signal index so that I can modify the signal, I need a port number.
The Simulink reference said to input the port number from the output of this function xPCOpenTcpIpPort(const char *ipAddress, const char *ipPort);
However, xPCOpenTcpIpPort function requires me to know Simulink's ipAddress and ipPort.
I can find my ipAddress (I assume this is Simulink's ipAddress also?) using ipaddress = char(getHostAddress (java.net.InetAddress.getLocalHost));
However, I do not know how to find Simulink's ipPort through MATLAB. Do you know how?
Thanks.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by