01-04-2022 08:34 AM
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?
01-04-2022 10:48 AM
You can make your own DLL with the application builder.
If the API is correct, it will work.
01-04-2022 03:42 PM
I think the OP is talking about creating a model dll, used for HIL/VIL testing.
01-05-2022 04:22 AM
@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.
01-05-2022 09:13 AM
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.
01-05-2022 09:41 AM
@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.
01-05-2022 10:23 AM
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.
01-05-2022 10:54 AM
@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.
01-05-2022 08:25 PM
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
01-06-2022 02:36 AM - edited 01-06-2022 02:53 AM
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