Strings Not being read properly during simulation

Moderator: Moderators

Strings Not being read properly during simulation

Postby ohs18 » Tue Mar 02, 2021 12:52 pm

Hi,

I am running a simulation where I run an activity diagram that passes a block's value properties into a matlab function called by an opaque behavior. Most of the value properties I am passing are integers, but I am also trying to pass a couple string value properties as well. When I run the simulation, I can see the Name and the default value properly display in the variables pane. For example, I have a value property called "location" with a default value of "United States" which is of type string. However, when I type the the variable name in the command window with Matlab as the language, it displays as "[]", which I am assuming is an empty array. I'm not sure why this is happening or how to fix it, so any help is greatly appreciated.

Thanks
ohs18
Forum Newbie
Forum Newbie
 
Posts: 17
Posts Rating:1
Joined: Wed Jan 20, 2021 7:08 pm

Re: Strings Not being read properly during simulation

Postby BB_ » Mon May 02, 2022 1:10 pm

Hello. In version 19.0, Cameo cannot pass strings between itself and MATLAB. I've heard this is fixed in newer versions but I have not tried so I cannot say for sure. I've been converting strings to bits to pass between the two and then reassembling them into strings on the receiving end.
BB_
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:0
Joined: Wed Mar 30, 2022 6:05 am

Re: Strings Not being read properly during simulation

Postby pete.paraska@jhuapl.edu » Thu Apr 20, 2023 11:15 am

Does anyone know if the passing of String type values in Cameo through Simulation Toolkit into Matlab has been fixed in 2022x or if there is some trick to doing it?
pete.paraska@jhuapl.edu
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Thu Apr 20, 2023 10:18 am


Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 2 guests