LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to call a simulink dll without using Simulation Interface Tookit?

hi,
I have a problem about how to call a dll generate by Matlab simulink without using Simulation Interface toolkit?
In my case, I don't need to modify the simulink model parameters. However, the simulink model has input and output ports, which exchange data with Labview.
I am trying to use "Call Library Function Node" to do it. But I don't know which function in the library to call?
thanks,
Jason
0 Kudos
Message 1 of 4
(3,938 Views)
Hello Jason,

You need Simulation Interface Toolkit (SIT) to create a Simulink DLL that can be called from LabVIEW. If you create a generic DLL without SIT, LabVIEW cannot talk to the input and output ports of your simulink model.

The SIT enables you to create DLLs from Simulink models through Real-Time Workshop and Microsoft Visual C++. Using the Real-Time Workshop you convert a Simulink model file into a DLL. The Simulation Interface Toolkit includes a plug-in for Real-Time Workshop that converts the model file into C code and then compiles the C code into a model DLL using Microsoft Visual C++. Then SIT automatically builds a model VI that calls the model DLL.

You can find more info about this along with how to create and call Simulink DLLs from LabVIEW in this document:
http://www.ni.com/pdf/manuals/370420b.pdf

Hope this helps and good luck with your application!
Shakhina P.
Applications Engineer
National Instruments
Message 2 of 4
(3,925 Views)
If I create a dll for simulink model through Simulation Interface Toolkit, can I call this dll without using SIT?

My application is realtime, so it is impossilbe to commucate with the dll in realtime fashion. I can not change the simulink model parameters, thus I don't need to communicate with the dll. For me, the dll only has inputs and outputs through which I can give them data and get data outuput from the dll.

In other words, if I generate a dll through SIT, can I use this dll in a difference system which has no SIT?
0 Kudos
Message 3 of 4
(3,919 Views)
Hello Jason,

Once a dll has been created you do not need SIT if you do not need to update the front panel controls and indicators. Please refer to page 8 fo the user manual. The VI can directly interact with the model dll in the RT target. SIT will launch the server if you needed to update the host VI's controls or indicators. Since you did not want to update the controls and indicators, you should be fine.

Hope this helps.

Regards,

Arun V
National Instruments
0 Kudos
Message 4 of 4
(3,902 Views)