I'm searching for a method how to integrate Simulink with Integrity Modeler. I'm working with Simulink synchronizer, but there is always a mistake:
''An error occurred whilst interfacing with Simulink.
' 0×0 empty char array' is not a valid model name because it is not a valid MATLAB function name. ''
Can someone help me and show a simple example how to integrate Simulink with Integrity Modeler?. ( tutorials e.t.c)
Have you reviewed the Help topic "Integration for MATLAB Simulink"?
There's lots of information on setup and how to use the integration.
I would also check the Modeler Release Notes (Support for Third Party Products) and confirm you are using a supported version of Simulink.
If there is still a specific issue, you should log a call with PTC Support.
There is an example Simulink model provided in the Examples repository called "Speed Controller". Recommend you use the model provided with Modeler 8.3 M020 (also called 8.3b). You will need Visual Studio and obviously Simulink installed to run. View the Readme inside the model for more information and refer to the Help.
Hopefully this will help you get started.
Unfortunately i was not able to solve the problem. In this post i will try to present it by screens.
1. First we have the speed controller block diagram.
2. In the second step i have opened speedometer
In this ibd tools-->simulink synchronizer-->synchronize.
3. In the 3. step will be given the mapping name and the synchronization direction from integrity modeler to simulink.
5. At this point there is the first problem. Integrity modeler does not recognize the integrity and simulink data type. I don't know why.
6. Unfortunately always appears this error. I can only create empty mdl ord slx file.
I would be very grateful if you could provide me with some answers for my abovementioned problems.
I'm looking to forward to hearing with you.
I do see exactly the same behavior.
And it does not matter if I want to sync Simulink Blocks into Modeler or vice versa. Following exactly the guidelines in the Modeler help.
I use Modeler 8.3.18 (with Patches 8.3a and 8.3b) and Matlab/Simulink 18.104.22.1681655 (R2016b).
According to the Modeler Release notes (found as rtf file via the Modeler Help) Modeler 8.3 is tested with 2016a and supports 2006b or later.
-> Therefore this should not be the problem.
To try the SpeedControler example I am missing the VisualStudio installation. Therefore it is unfortunately not available to me.
Any help to get the Modeler-Simulink sync running would be most welcome.
Here another way to reproduce the described error (using my setting from above):
Now in Simulink:
Back in Modeler:
After a moment of processing the above mentioned error occurs:
An error occurred whilst interfacing with Simulink.
' 0×0 empty char array' is not a valid model name because it is not a valid MATLAB function name.
The same result, if you choose on the first page of the tool to create a fresh Simulink model by using the create button.
I hope this helps to reproduce the error and find the mistake.
If wanted I can also provide the files that came up with this procedure.
Help is still highly appreciated.
Unfortunately in our recent testing we discovered some changes introduced into Simulink 2016b and 2017a that stop our integration working correctly. So we recommend using 2016a if possible for now. Sincere apoloiges we haven't realised this and informed you earlier. We will be looking at fixing these isses and supporting the newer versions of Simulink in a future release.
thanks a lot for letting me know!
It is always helpful to know that it does not make sense to try further. Saves time and thought...
Looking forward to the fix in the future (hopefully: next) release.
But there is something left: I do have Matlab/Simulink 2015b available as well (parallel install) and exported the model to be saved for that version. Unfortunately that alone does not help, as I did not find a way to tell the Simulink-Synchonizer which version of Matlab to use when he starts the tool. He apparently takes the Windows default (Matlab 2016b), which I do not want to move to the old version (to avoid messing up with my other activities). Simply changing the standard applications allocated in Windows to the file name extensions .m, .slx, .sltx, .sldd, .mdl to the installation of the old Matlab 2015b did not help, anyway.
Is there a way to tell the synchronizer the path to the Matlab-Version to use? Maybe through a tweek of the vbs-files that the simulink profile invokes (to avoid the need of an update of "MathematicalHelper.dll" (which contains the Starter/Wrapper-Code of the Synchronizer, if I get it right), or the MathematicalModelSynchronizer.exe itself?
All the best
The trick to tell the Simulink synchronizer which Matlab version to use is simple, if you know the mechanics 😉
This is what I learned from support: The synchronizer uses the Matlab automation server registration to start Matlab. Therefore the Matlab version you want to use needs to be the registered Matlab automation server. By default this is the last Matlab version you installed. It remains registered until you manually change the registry or install a new version of Matlab.
To manually change the registration you need administrator privileges, as the windows registry needs to be changed. Then you have 2 ways: as administrator from the Windows command line or the Matlab command line.
Windows CLI: call the matlab version want to register with the parameter -regserver: C:\<matlabpath>\bin\matlab.exe -regserver
Matlab CLI (matlab started as administrator): regmatlabserver
The full story of changing the Matlab automation server registration you find at: https://de.mathworks.com/help/matlab/matlab_external/register-matlab-as-automation-server.html
After doing this for my Matlab 2015b installation it stopped using my Matlab 2016b installation and I came past the described error and I was able to synchronize!
In Modeler 8.4 we will supply step-by-step instructions for running a simulation with the Speed Controller example model.