LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MyRio using shared Library (.dll)

My Question is how can I use a shared Library (Windows .dll) on the myRio?

The library is imported into LabView and the created .vi is also able to be added to the Project, but when I try to run the project I get the following error:

 

LabVIEW:  Failed to load shared library dllTest.*:addOne:C. Ensure that the library is present on the RT target. Use MAX to install NI software or FTP to transfer custom libraries to the RT target.

 

I am quite new to LabView and RealTime systems, so I do not know how and especially where to transfer the dll to.

 

It is not possible, that the compilation process includes and copies the needed files to the myRio?

 

Thank you very much for your help

Johannes 

0 Kudos
Message 1 of 12
(6,790 Views)

Hello J.Michael,

 

The NI MyRIO runs NI LinuxRT, not Windows, and so won't be able to run a DLL compiled for Windows.  Rather, you'll need to compile a shared object (.so) library compatible with LinuxRT.

 

This tutorial provides more information on compiling for the LinuxRT OS:

 

Getting Started with C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition

http://www.ni.com/tutorial/14625/en/

 

Note that you will need to have access to the source for the library you're using and recompile for LinuxRT.  If you obtained the DLL from a third party, they will need to provide you with a compatible .so or their source so you can recompile it yourself.

 

Also, for further information on LinuxRT and other NI Real-Time OSs I'd suggest doing some general searching, but here are a few links to get you started:

 

KnowledgeBase 4LRA4IQ0: What Operating System is my Real-Time Controller Running and Why?

http://digital.ni.com/public.nsf/allkb/35F1FD98520D6E0E8625783A005AF557

 

NI Community: NI Linux Real-Time FAQ

https://decibel.ni.com/content/docs/DOC-35053

 

Hope that helps!

Tom L.
0 Kudos
Message 2 of 12
(6,768 Views)

Thank you very much Tom for the quick response.

 

The dll is selfwritten, so I will have a look at the Tutorials you sent me and try to convert it to the desired type. 

Including the shared library itself should hopefully work then. 

 

Greeting 

 

J.Michael

0 Kudos
Message 3 of 12
(6,752 Views)

Hi RDFer,

 

We don't currently support NI USRP with myRIO.   We have a list of hardware that is supported with NI USRP located here:

 

NI-USRP 14.0 Read Me - http://www.ni.com/pdf/manuals/374760a.html.

 

G-IV

0 Kudos
Message 4 of 12
(6,099 Views)

Please note that you need to copy the shared library yourself in some ways to the right location on the myRIO and to run ldconfig on the directory where you added the library into. LabVIEW doesn't automatically deploy the shared library to the target when it deploys the compiled VIs.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 12
(6,081 Views)

if anyone knows how to deploy .dll file into myrio or how to convert these files which support in myrio any tutorial or examples is there means it helpful. (right location on the myRIO and to run ldconfig on the directory) please provide any help file for this content.

0 Kudos
Message 6 of 12
(3,889 Views)

As explained before in this thread you don’t deploy DLL files to the myRIO (or any othe NI Linux RT based target). You need the C sources for the DLL and likely adapt them to run under Linux and then compile them into a shared library (*.so) to use on the myRIO. Once you got that done report back.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 12
(3,885 Views)

I got it what ever u r explained but i have one doubt. Right now i have C source code for the DLL and similarly if i have to generte shared library (*.so) means i have to use linux platform or any other way is there to generate from windows platform please any source is there for conversion is more helpful.

0 Kudos
Message 8 of 12
(3,873 Views)

When you post questions you should investigate the previous posts and any links that are posted in there. Tom L. in his answer to the initial question did list several links that are all relevant. One of them was http://www.ni.com/tutorial/14625/en/ which explains about obtaining and installing the Eclipse based C/C++ Development environment with the necessary GCC toolchain to develop code for the NI Linux Realtime targets. 

 

The Eclipse based IDE runs perfectly fine on your Windows system and I use it regularly. You can however also install the C development support on your RIO system itself from the NI package repository and directly compile your sources on the target too if you want, but that is an even more different user experience to your standard Visual something IDE than with Eclipse.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 12
(3,866 Views)

thanks for your response.

0 Kudos
Message 10 of 12
(3,856 Views)