How can I write Log messages from FMU exported from MATLAB/Simulink
An FMU can issue log messages througt the fmiCallbackLogger member of the fmiCallbackFunction.
I have an FMU that is exported from Simulink (version 2024) that has a ‘MATLAB Function’ block that contains MATLAB code.
How can I write FMU log messages from the MATLAB code inside this block?
If I enable ‘Debug Logging’ in the fmpy.gui tool I can indeed see log messages coming from MATLAB :
CommunicationStepSize=0.2, LocalSolverStepSize=0.2
Local solver will do 1 steps from t = 0.2.
getReal vr:0, value:0.000000
getReal vr:1, value:0.000000
getReal vr:2, value:0.000000
getReal vr:3, value:0.000000
getReal vr:4, va lue:0.000000
But how do I add my own log messages?An FMU can issue log messages througt the fmiCallbackLogger member of the fmiCallbackFunction.
I have an FMU that is exported from Simulink (version 2024) that has a ‘MATLAB Function’ block that contains MATLAB code.
How can I write FMU log messages from the MATLAB code inside this block?
If I enable ‘Debug Logging’ in the fmpy.gui tool I can indeed see log messages coming from MATLAB :
CommunicationStepSize=0.2, LocalSolverStepSize=0.2
Local solver will do 1 steps from t = 0.2.
getReal vr:0, value:0.000000
getReal vr:1, value:0.000000
getReal vr:2, value:0.000000
getReal vr:3, value:0.000000
getReal vr:4, va lue:0.000000
But how do I add my own log messages? An FMU can issue log messages througt the fmiCallbackLogger member of the fmiCallbackFunction.
I have an FMU that is exported from Simulink (version 2024) that has a ‘MATLAB Function’ block that contains MATLAB code.
How can I write FMU log messages from the MATLAB code inside this block?
If I enable ‘Debug Logging’ in the fmpy.gui tool I can indeed see log messages coming from MATLAB :
CommunicationStepSize=0.2, LocalSolverStepSize=0.2
Local solver will do 1 steps from t = 0.2.
getReal vr:0, value:0.000000
getReal vr:1, value:0.000000
getReal vr:2, value:0.000000
getReal vr:3, value:0.000000
getReal vr:4, va lue:0.000000
But how do I add my own log messages? fmi, fmu, logging MATLAB Answers — New Questions