Did you know that it is possible to visualize the calling of Simulink Functions using the Sequence Viewer? Let's see how that works and in what type of situations it can be particularly useful.
Here is a question I have recently been asked:
I have a Simulink model with a Simulink Function. The model contains multiple Function CAller blocks that can call this Simulink Function. The Simulink Function contains a MATLAB Function block. When I put a breakpoint in the MATLAB Code, I want to know from which Function Caller block originated the call.
The Sequence Viewer
The answer is a feature I typically use when dealing with SimEvents and Stateflow: The Sequence Viewer.
When the breakpoint in the MATLAB Function block will be hit, you will know that the last client in the list is the one calling. In this image, we are at simulation time t=1sec, and the client is CallerB:
Now it's your turn
Are you using the Sequence Viewer in your daily workflow? If yes, tell us why and how in the comments below.
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.