LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Library on myrio (Linux Real time system)

Dear all,

    I am a green hand for Labview and Linux real time system. Now, I am doing a project containing import C library into Labview and implement it on myrio (the linux real time system) using "call function node".

    My operating system is windows, Thus, I first make a simulation through importing DLL as a windows library to test the project and it works out. After this, I want to implement it on myrio. I follow the instruction "for C Support for NI myRIO User Guide" something like setting crossGCC compiler for arm architecture etc. Then, I need to use linux shared library (.so file) rather than DLL to work on this.

I met the same problem as:

http://forums.ni.com/t5/LabVIEW/How-to-create-shared-library-for-linux-real-time-target-in/m-p/28218...

which is about "call function node " could not recognise .so library and it is probably becasue I install the labview on windows

Thus, I follow the solution from that link.(creating both .dll and .so with the same name, and import <your library name>.* then Iabview will recognize it according to the environment)

However, there is still the same problem:

 

 

QQ截图20140509122628.png

I search this problem and find a solution says I need to install the software on my linux real time system called " NI-RIO IO Scan" the link is:

http://digital.ni.com/public.nsf/allkb/1C3E4B2FA98A2E6686257A40005B596C

After installing the software, the problem still exists.

Have you ever met this problem?

By the way, as for DLL I use "extern __declspec(dllexport)"  to declare the exported function, while for .so library, I use "EXPORT __attribute__((visibility("default")))" as an equivalent declaration, is it right?

QQ截图20140509123711.png

Thank you!

0 Kudos
Message 1 of 3
(3,583 Views)

The error you saw in the other post was specific to a certain component that was not installed on the system so it could not find the shared library this component contains. Your shared library is your own and is certainly not installed by the NI RIO IO Scan package.

 

Most likely you simply deploy your application to the real time controller. With that the compiled VI code gets transparently transfered to the memory of the RT system to be executed, but the shared library being an external component is not automatically picked up by it. You should make sure to first copy it by hand to the /usr/lib directory as described in this post.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(3,546 Views)

Hi,

 

The link to the post seems to be broken. How do you copy a custom library to the file system?

 

Thanks.

0 Kudos
Message 3 of 3
(3,090 Views)