Running a Matlab Function in Constraint Block

Discussions about integrations with other 3th party tools

Moderator: Moderators

Running a Matlab Function in Constraint Block

Postby constantinos.florides@rwth-aachen.de » Sun Jul 11, 2021 2:50 pm

Hallo,
i have a matlab script that runs a function with 28 Inputs and 4 Outputs. I have modelled this function in a constraint block. Also some of the inputs are strings, so i changed the type of these values to strings.So i am running this Constraint Block, i type the values and nothing happens. I donĀ“t even can check if my simulation is runnng. But apparently it is not working. This Matlab code outside of cameo works fine. So do you have any advices? thank you very much
constantinos.florides@rwth-aachen.de
Forum Newbie
Forum Newbie
 
Posts: 5
Posts Rating:0
Joined: Thu Jun 03, 2021 4:26 am

Re: Running a Matlab Function in Constraint Block

Postby saulius_p » Wed Jul 14, 2021 4:25 am

Hello,

Good to talk to you.

There was a problem about sending string value to Matlab in CST 19.0 sp4.
It is fixed in 2021x and later versions.

Sincerely,
Saulius
Best regards,
Saulius Pavalkis
User avatar
saulius_p
No Magic
No Magic
 
Posts: 335
Posts Rating:14
Joined: Fri Dec 04, 2009 5:37 am
Full name: Saulius Pavalkis

Re: Running a Matlab Function in Constraint Block

Postby constantinos.florides@rwth-aachen.de » Wed Jul 14, 2021 6:06 am

Thank you for your reply, i am currently using CSM 19.0 SP3.
I passed a string in Matlab and i coud run my simulation. But the results of Matlab were not transferred in CSM SImulation console. I already checked and my outputs from matlab are 4 double numbers,but in CSM would not appear. Do you have any suggestion why is that happenning?

Thank you very much,
Constantinos
constantinos.florides@rwth-aachen.de
Forum Newbie
Forum Newbie
 
Posts: 5
Posts Rating:0
Joined: Thu Jun 03, 2021 4:26 am

Re: Running a Matlab Function in Constraint Block

Postby michael.enoch@lmco.com » Wed Sep 15, 2021 12:00 pm

I am also having this issue with Cameo not processing return values or strings generated by the MATLAB functions. I also see Cameo generating errors when I try to pass strings and structs to the MATLAB functions.

Moving to Cameo 2021x is not a viable option at this time. Is there any alternative to doing that? Any other workaround or even confirmation that the MATLAB integration works properly in an earlier version of Cameo?

Thank you.
michael.enoch@lmco.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Mon Aug 20, 2018 2:58 pm

Re: Running a Matlab Function in Constraint Block

Postby saulius_p » Thu Sep 23, 2021 3:05 pm

Hello,

Good to talk to you. This issue is known and fixed in recent release v2021x

Do you need to pass string into Matlab? Maybe integer or real can be passed as workaround?

Sincerely,
Saulius
Best regards,
Saulius Pavalkis
User avatar
saulius_p
No Magic
No Magic
 
Posts: 335
Posts Rating:14
Joined: Fri Dec 04, 2009 5:37 am
Full name: Saulius Pavalkis


Return to Integrations

Who is online

Users browsing this forum: No registered users and 1 guest