LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a shared library (.so) for my sbRIO?

Solved!
Go to solution

I have followed several tutorials online, but I didn’t find a solution.

 

I want to program and use my own simple shared object library for my Linux Real Time sbRIO system. I am testing a simple function that adds two numbers and returns the result.

 

I’ve completed the following steps:

 

  1. Created the c and h files in Eclipse. 
    1. I built the shared library (.so) from my c project using the Cross GCC compiler in Eclipse. You can see that the build was successful in the console screen. (See first two screenshots)

     

    1. I put the .so file in /usr/local/bin on my sbRIO.

     

    1. I created a VI with the Call Library Function Node on my sbRIO.

     

    1. In configured the Call Library Function Node. (See last few screenshots)
    2. The run arrow is broken, and I receive the error in the last screenshot. I’ve searched a lot and tried a bunch of stuff, but I cannot seem to get it to work. Could someone please tell me where I went wrong or post a working example?

       

      Thanks.

 Screenshots.i1.pngi2.pngi3.pngi4.pngi5.pngi6.pngi7.png

 

 

 

 

0 Kudos
Message 1 of 4
(3,750 Views)
Solution
Accepted by topic author JHugh

I managed to get it to work, and I'll post my solution in case it helps someone else.

 

I had to install NI Real-time and NI FPGA onto my laptop before connecting to the board. If you connect to the board before installing the above software, it will not run. You have to delete the target and reconnect after installing the above software.

0 Kudos
Message 2 of 4
(3,686 Views)

Hello,

 

Actually am using MYRio board and i have c and .h file generated from matlab but now i have doubt how to work these files in myrio. because i saw that u created .so files which support to the rio please give steps how to creat .SO files and how to run on MYRIO plat form. I am successfully run .DLL file in labview but not able to run in MyRio.

 

I also compile the c files in linux platform and created .SO files but not able to run in myRio i am getting below error please help me to solve this issue in steps. if wants i'll share the created .So fles but other than .so files every thing working fine.

 

Please do needful how to create and run .SO files with existing C and .H files

 

error am getting i shown below.

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

 

 

0 Kudos
Message 3 of 4
(2,869 Views)

Is there any new update on this .SO access? If its solved, can you share basic pictures of code or steps to access Linux .SO in Windows LabVIEW

Tejaskumar Patel | (CLD)
0 Kudos
Message 4 of 4
(1,958 Views)