MATLAB Function in Activity Diagram to Output (2) Variables

Moderator: Moderators

MATLAB Function in Activity Diagram to Output (2) Variables

Postby » Thu Aug 12, 2021 1:25 pm


I have a very simple Cameo model with only a handful of very small activity diagrams. In one of the activity diagrams, I dragged and dropped a MATLAB function I had built that would provide two outputs.

I initially tried a single function output ( x = function(a,b,c) ), and that worked just fine. However, when I request a second output ( [x,y] = function(a,b,c) ) the activity block still only gives me one output.

When I follow the simulation, I can see that both output pins in the MATLAB function block are activated, but only one pin actually outputs a value. The other pin only outputs a red dot and my value is not updated in the instance.

I have played with the multiplicity, the type, and the sync element of the output pin names, and I made sure that the function block was the correct and up-to-date function. And yes, I am able to get both outputs when I call the function in MATLAB. I don't think that is the issue. Thank you for any advice!
Forum Newbie
Forum Newbie
Posts: 1
Posts Rating:0
Joined: Thu Aug 12, 2021 1:14 pm

Re: MATLAB Function in Activity Diagram to Output (2) Variables

Postby saulius_p » Tue Aug 17, 2021 9:46 am


Good to talk to you. Could you check build in sample? It has the same case available:

\Program Files\Cameo Systems Modeler\samples\simulation\CarBrakingAnalysis\CarBrakingAnalysis.mdzip

Let us know if problem still persist.

Kind regards,

You do not have the required permissions to view the files attached to this post.
Best regards,
Saulius Pavalkis
User avatar
No Magic
No Magic
Posts: 335
Posts Rating:13
Joined: Fri Dec 04, 2009 5:37 am
Full name: Saulius Pavalkis

Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 0 guests