LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXG Call DLL

Solved!
Go to solution

Reading the Labview/NXG comparison:

 

http://www.ni.com/en-ca/shop/labview/compare-labview-nxg-and-labview.html

 

on the software tab, it says that it supports calling DLLs, but I can't find a Call Library or similar function. Does anyone know where it is?

0 Kudos
Message 1 of 15
(6,163 Views)

There is an example under the Learning Tab in Examples > Programming Basics > Connectivity > External Code (DLL) Execution and appears to be implemented as the Shared Library Interface project item instead of the CLFN.

 

I haven't done this myself so let me know if you run into problems.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 15
(6,079 Views)

So I found that example, and found the Support VI that it specifies, but as dumb as it sounds, I can't figure out how to replicate the calling block. I had created another VI where I used the Shared Library Interface, but again, I can't figure out how to actually call the result. I feel really dumb.

0 Kudos
Message 3 of 15
(6,048 Views)
Solution
Accepted by topic author CanadaGuy

@raceybe wrote:

So I found that example, and found the Support VI that it specifies, but as dumb as it sounds, I can't figure out how to replicate the calling block. I had created another VI where I used the Shared Library Interface, but again, I can't figure out how to actually call the result. I feel really dumb.


So I just found the example program and assumed it would be helpful but when I tried to do this I was just about as lost as you were. I had to look internally and found someone who made a gif of the process.

 

SLI.gif

 

It looks like this is tied to CAR 611080 and there is supposed to be a palette on the block diagram for project items.

Matt J | National Instruments | CLA
Message 4 of 15
(6,028 Views)

Okay, good to know. Thanks.

0 Kudos
Message 5 of 15
(6,025 Views)

Is there any way to set a relative path to the DLL in the .sli? Using the browse button, the result is always an absolute path. 

 

And is there a way to set the path from the block diagram of the calling VI?




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


0 Kudos
Message 6 of 15
(5,899 Views)

Hi Joerg, 

 

You can use the standard Window's conventions for relative paths in the file path.


In the example, I set the path to what I have in the image below. This would imply that the path is relative to the GVI, under the support folder. RelativePaths.JPG

 

There currently isn't a way to set the path from the block diagram of the calling VI, unfortunately.


Regards,

Stephen 

0 Kudos
Message 7 of 15
(5,860 Views)

Stephen, 

 

thanks for your help. I had already tried what you suggest, and for whatever reason it doesn't work for me. I cannot get LabVIEW to find the DLL if not referenced absolutely.

 

I've had my fair share of experience with libraries, both .dll and .so, but NXG seems to be getting the better of me so far 😞relative 2.pngrelative 1.pngabsolute - working.png




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


0 Kudos
Message 8 of 15
(5,840 Views)

I'm not sure how Stephen was getting that to work. When I try to give a relative path from the example External Code project, I also get a broken run arrow and errors about finding the DLL. I am pretty confident that the SLI feature does not support relative paths at this time, but of course we're always working on improving our products and NXG in particular has a lot of improvements coming up.

 

Regards,

 

Cason

NI Applications Engr.

Cassandra Longley
Senior Technical Support Engineer - FlexRIO, High Speed Serial and VRTS
0 Kudos
Message 9 of 15
(5,817 Views)

Thank you, Cason. I also posted here - any possibility that you could share some details about the how's and when's in that other thread?




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


0 Kudos
Message 10 of 15
(5,804 Views)