Thanks for the help. I just missed this point in example, but it is not what was causing the problem. Actually for some reason SM version 12.1 couldn't export an FMU for that model, but 12.3 version does! So the update solved my problem.