Closed gowthamsrinivasan closed 2 years ago
Did you move or delete the folder with the extracted FMU (FMU Dialog > Advanced > Unzip directory
)?
My expectation is that if the extracted folder is not available, the tool shall unzip the .fmu file again as long as it finds the .fmu in the MATLAB path.
Nevertheless, I haven't moved the extracted folder. I just restarted MATLAB and simulated again. The .fmu is also found in MATLAB path, and the extracted folder is also available:
Still I am facing the issue.
Can you provide steps to reproduce the problem with v3.0-alpha.1?
I installed the new zip to reproduce the problem, and this time I see access violation error.
Error reported by S-function 'sfun_fmurun' in '<Model>/<Subsystem>/FMU':
The FMU reported an error.
Component:Simulink | Category:Block error
Error reported by S-function 'sfun_fmurun' in '<Model>/<Subsystem>/FMU':
The FMU crashed (exception code 0xc0000005 (ACCESS_VIOLATION)).
My expectation is that if the extracted folder is not available, the tool shall unzip the .fmu file again as long as it finds the .fmu in the MATLAB path.
That would also be my expectation!
@t-sommer Do you have any updates?
Are you calling FMIKit.initialize first thing before opening the model? We have a similar issue and this was the root cause. To avoid some headaches, we patched FMIKit to automatically initialize. There still seem to be a few cases where we see the same problem with the ports/model disappearing. With regards to automatically unzipping if the path does not exist, that would be a useful feature. But I think the unzipping happens in the GUI / Java code, so you would need to patch that
I am able to import the FMU (which was exported using gtrfmi coder target) into FMU Import Block of FMIKit, and I am also able to simulate. After saving this block in a Simulink Library model, when I start a new MATLAB session and simulate the saved model, I expect that the model should work as before. Instead, I get the following error:
And the FMU Block looks as if the interfaces cannot be read.
It works after I reload the FMU into the block. Is this a known issue? Is there a path problem here?