Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug : MatlabString cannot be cast to StructMatlabData #29

Open
phanthanhliem opened this issue Mar 19, 2015 · 5 comments
Open

Bug : MatlabString cannot be cast to StructMatlabData #29

phanthanhliem opened this issue Mar 19, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@phanthanhliem
Copy link

Hi,

I've just encountered a bug when i tried to export. The problem context is below
I have an slx model : "Plant_And_Control_FMU.slx".
I import it into "Plant_And_Control_FMU.simulink". No problems here, everything seems fine.
I then tried to export "Plant_And_Control_FMU.simulink" into "Plant_And_Control_FMU.slx" (in another folder, of course).
I haven't changed anything in the model.simulink, nothing.

Then I've got this error:
image

I have no idea about this kind of casting error.

@phanthanhliem
Copy link
Author

I regenerated "Plant_And_Control_FMU.simulink", and reexport to obtain "Plant_And_Control_FMU.slx". There is no error this time. I don't know why the first import/export has the error like that.

@abelhegedus
Copy link
Member

Thanks for the report! I suppose you no longer have the original .simulink that caused the error? It would be interesting to compare them to see if they differ in anything. If not, then there is some other setting or environment issue that caused it.

@phanthanhliem
Copy link
Author

Hi abelhegedus,

Actually, the error of the first export is my fault, i didn't config correctly the library FMI toolbox, a library which allow us to import and export the FMU block. You can download the demo version here: http://web.modelon.com/cn/aavt4/fmit-download.
I have tried both licence & demo version, but both don't work.

The second exportation has no error, but the output was exactly the model with the same name (Plant_And_Control_FMU.slx), which exists in one of the path in Matlab.
You can see the warning here:
image
I dont understand why Massif write the output in the output directory as if it was a successful export,
although it did nothing but copying the whole model.

And finally, i still couldn't export "Plant_And_Control_FMU.simulink" into "Plant_And_Control_FMU.slx".
The errorneous exported model:
image
The origin model: Plant_And_Control_FMU.slx
image

And this is the error message from MASSIF:
image

I've tried import/export a model called "Plant_And_Control.slx" (a complex model) without using FMI Toolbox, it works fine. No problem at all.

Do you have any clue to import/export a model which use third party library (like FMI Toolbox) in this case?

@abelhegedus
Copy link
Member

We will take a look at the issue, there should be no restriction on third party libraries. @imbur do you have any ideas?

@imbur imbur self-assigned this Aug 3, 2017
@imbur imbur added the bug label Jul 10, 2018
@abelhegedus abelhegedus added this to the 0.8.0 milestone Nov 19, 2018
@abelhegedus
Copy link
Member

Check if problem still exists and add test to repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants