LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Alternatives to calling LabVIEW created DLLs from LabVIEW?

I would like to create a compiled LabVIEW application (Exe) that is modular in the sense that it that can load other external, LV-compiled modules at runtime. What is the best option? I see that I can compile a DLL with from LV code, but get the sense that this is usually when you wan to call LV created code in another programming language. Using the Call Library Function node seems a cumbersome way to call LV compiled code. I know I can write a LV Exe to dynamically load a .VI file at runtime (provided the VI's compiled code has not been separated). This seems like a better approach but don't really want to distribute the "source" code. Packed Project Libraries seems overkill and geared towards code sharing. Of course I can compile other Exes an load them but then have to deal with inter-process communications.

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

Hi Edu,

 


@EduNI wrote:

This seems like a better approach but don't really want to distribute the "source" code. Packed Project Libraries seems overkill and geared towards code sharing.


So you don't want to share source code, but you think lvlibp is "overkill"?

They just provide a clean way to distribute compiled VI libraries without their source code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,420 Views)

I agree with GerdW. You're over-complicating this.

 

A packed project library is exactly what you're looking for. In your final released code it's a single file, it doesn't contain your source code with it because it's compiled, and it's easily callable from your main LabVIEW application.

0 Kudos
Message 3 of 10
(2,405 Views)

Third vote for packed project libraries. They are great for implementing plugins.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 10
(2,396 Views)

Thanks for the quick replies. An LVLIB seems overkill from the perspective: if I want to create an LVLIB for a single wouldn't I have to create a separate project just for that one VI? When I try to create a Packed Project Library it tells me I need to include a Top Level Library. So I need to create a library before I can create a library?

0 Kudos
Message 5 of 10
(2,392 Views)

@EduNI wrote:

So I need to create a library before I can create a library?


Packed project library is the compiled version of a LV Library. So yes, you need something to compile before you can compile it.

 


@EduNI wrote:

if I want to create an LVLIB for a single wouldn't I have to create a separate project just for that one VI?


Generally a packed project library will have multiple VIs in it, not just a single. What you're suggesting would be the equivalent of creating a .DLL with a single call. Yes it would be doable, but it would be cumbersome in either case.

0 Kudos
Message 6 of 10
(2,389 Views)

Another vote for PPL, it is the defacto, proven, reliable and scalable way to go for plugins

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 7 of 10
(2,372 Views)

@santo_13 wrote:

Another vote for PPL, it is the defacto, proven, reliable and scalable way to go for plugins

-Santhosh
Semiconductor Validation & Production Test
Soliton Technologies
NI CLD, CTD
LabVIEW + TestStand + TestStand Semiconductor Module (2013 - 2020)
NI STS for Mixed signal and RF

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



Things Not To Do

  • Do not have huge signatures. They waste space on the forum and can clutter the conversation. Signatures are okay, but large ones are discouraged.
0 Kudos
Message 8 of 10
(2,272 Views)

@santo_13 wrote:

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


From the community guidelines

Things Not To Do

  • Do not have huge signatures. They waste space on the forum and can clutter the conversation. Signatures are okay, but large ones are discouraged
0 Kudos
Message 9 of 10
(2,286 Views)

From the community guidelines

Things Not To Do

  • Do not have huge signatures. They waste space on the forum and can clutter the conversation. Signatures are okay, but large ones are discouraged
0 Kudos
Message 10 of 10
(2,288 Views)