LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create MIT DLL from LabVIEW

We have developed a LabVIEW system that runs a DLL compiled with the NI Veristand compiler in Simulink. The system also loads FMU's without any problem (!).

 

For another project I don't have the simulink available so I am not able to compile the required code. Does anyone know if it is possible to compile a DLL (FMU's probably not supported yet) from the LabVIEW environment and run it using the model interface? 

 

I have searched some, but I only see solutions with NI Veristand (that is if they are a solution to my problem) and Veristand is expensive. Is this the only solution?

0 Kudos
Message 1 of 10
(1,275 Views)

You can make your own DLL with the application builder.

 

If the API is correct, it will work.

0 Kudos
Message 2 of 10
(1,245 Views)

I think the OP is talking about creating a model dll, used for HIL/VIL testing.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 10
(1,222 Views)

@santo_13 wrote:

I think the OP is talking about creating a model dll, used for HIL/VIL testing.


Yes, and if the API is correct, it will work.

0 Kudos
Message 4 of 10
(1,199 Views)

santo_13 is right, I wan't to build a dll in LabVIEW which I can use with the "Model Interface" Palette.

 

I would find it strange if it is only possible to run DLL's compiled from an external program, and not from within LabVIEW itself.

0 Kudos
Message 5 of 10
(1,176 Views)

@ThetaMa wrote:

santo_13 is right, I wan't to build a dll in LabVIEW which I can use with the "Model Interface" Palette.

 

I would find it strange if it is only possible to run DLL's compiled from an external program, and not from within LabVIEW itself.


That's not weird, it's not true.

 

I've build lots of LabVIEW DLLs and used them in LabVIEW.

0 Kudos
Message 6 of 10
(1,172 Views)

A lot of us use labview compiled dll's within LabVIEW, but that is not what this topic is about.

 

Dll's in the model interface have a special setup, simulation time, names of input/output and parameters etc. It is not a "normal" dll (if that exist).

 

If you have a solution I would really like to know. An answer like "yes it is possible" is not helping.

0 Kudos
Message 7 of 10
(1,161 Views)

@ThetaMa wrote:

Dll's in the model interface have a special setup, simulation time, names of input/output and parameters etc. It is not a "normal" dll (if that exist).


The setup (inputs\outputs\parameters etc) is called the API... All DLLs have a API. Seems exactly like any (normal) DLL to me.

 

Again, if the API is correct, it will work.

 

You know the API, what is stopping you from making a DLL with that API in LabVIEW?

 

Does these DLLs you want to 'copy' have header files? If so, you could try the Import Shared Library Wizard in Tools»Import»Shared Library Wizard.

0 Kudos
Message 8 of 10
(1,156 Views)

I have once tried a demo of model simulation features of the Model Interface Toolkit.

 

Maybe you can try installing https://www.ni.com/en-us/shop/software/products/labview-model-interface-toolkit.html

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 9 of 10
(1,135 Views)

wiebe@CARYA wrote:

@ThetaMa wrote:

Dll's in the model interface have a special setup, simulation time, names of input/output and parameters etc. It is not a "normal" dll (if that exist).


The setup (inputs\outputs\parameters etc) is called the API... All DLLs have a API. Seems exactly like any (normal) DLL to me.

 

Again, if the API is correct, it will work.

 

You know the API, what is stopping you from making a DLL with that API in LabVIEW?

 

Does these DLLs you want to 'copy' have header files? If so, you could try the Import Shared Library Wizard in Tools»Import»Shared Library Wizard.


BTW if you have such a dll and VIs that call it, that would also be enough to create a DLL with the same API. Of course the functions would be like black boxes. Guessing what's inside each function might not be easy. I never said it would be easy...

 

EDIT: Not sure, but the API might be like described here: Package Generated Code as Shared Libraries - MATLAB & Simulink

0 Kudos
Message 10 of 10
(1,124 Views)