Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am a new user in matlab/simulink, and I'm working on a stand-alone application under Windows, where an interface will be created with Visual Basic and which will include a simulink model.

I'm trying to create a DLL with matlab/simulink in order to use it with Visual Basic, it's really confusing. I don't know whether to use a real time workshop or the C compiler or a COM object in order to use a simulink model in VB and interract with it.

I'll be grateful if you can help me with this. Thanks in advance for reading my post and helping me.
Posted
Updated 8-Mar-10 9:07am
v3

The COM object is likely to be the easiest route if you are talking VB6 instead of VB.NET, provided you define the IDL as a ole automation object and not just a dispinterface. An automation interface object supports early binding, which makes it reasonably easy to work with in VB6.

If it's VB.Net you are using, then a C style DLL with exports would be fairly easy to use via PInvoke[^] provided the metods needed required only relatively simple parameters (complex parameters like structures can also be handled, but there is a bit more learning curve.
 
Share this answer
 
Thanks for help but did any one know how to create com object from a simulink model under matlab in order to use it in VB?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900