Open naveenjeevanantham opened 1 year ago
We experience an error with ML/SL 2018b and FMI-Kit 3.1 Error: File: rtwsfcnfmi_make_rtw_hook.m Line: 59 Column: 30 Functions cannot be indexed using {} or . indexing.
The problem is, that
version = str2double(ver('MATLAB').Version);
creates an error in 2018b
In 2022b, all works fine.
The same error with MATLAB 2022b FMI-Kit 3.1
The issue is related to code generation of s-function parameters. I think the issue is FMIKit is not exporting the s-function input parameters into FMU.
Inputs for ECU_sfun -> 'ZFLSECUEPS50DEV', 'ZFLSECUEPS50DEV.par'. The first param is just the name of file, and the second param is a xml file. So the generated FMU should consist of this file in it.
And also when I checked the generated code, I saw that sfunc params are ZERO. That means It is taking NULL value as input and followed by the error when I tried to run it.
Matlab Version: 2022b FMIKit: 3.1 and the s-function is a binary file of *.mexw64 with no associated source files with us.
Ultimately our requirement would be to include the parameters also with the FMU.
SFunction parameters function :
taking Null parameter.
Figure 2: Generated code from FMIKit
I was trying to generate an FMU from an Matlab Simulink model. I am getting an error in S-function
I assigned Code generation target as rtwsfcnfmi.tlc and the fmu type as CoSimulation.
Environment Details:
Error Details :
The call to rtwsfcnfmi_make_rtw_hook, during the after_make hook generated the following error :
Caused by :
In addition to that, The same thing I also tried with FMIKit 2.7 version, By this time FMU was generated but the fmu was not working, I checked with FMU checker I got the Below error