LabVIEW – NI-Eclipse. Make use of open C/C++ libraries in NI-RealTime (Intel/ARM/Linux) by recompiling it using NI-Eclipse

Home / Blogs / LabVIEW – NI-Eclipse. Make use of open C/C++ libraries in NI-RealTime (Intel/ARM/Linux) by recompiling it using NI-Eclipse
There would be some hard times as a LabVIEW developer when you’re able to find libraries available for windows but not for your NI Linux targets. Some times it would be relaxation when we want that library for our NI-Pharlap based target, because to some level you can call the windows based DLL/Library APIs in NI-Pharlap. However, when it comes to Linux based NI target, it’s quite frustrating that we can’t find right libraries because as LabVIEW developer we always biased with Microsoft Windows mindset.
Recently I came to such regrets then a ‘yay’ moment after bumping in some rough surfaces. For one of the LabVIEW application with ByteLabs, we found a library available in windows but we wanted the same library for our NI-Linux based RT target. Our team thought, Oh, No! it’s again no useful because this library is built in windows and will not support in our Linux RT. Luckily I found that the library source is built in C language and it’s open library. Almost at the same moment I got to know NI provides Eclipse IDE for developing & compiling Linux libraries/executable using C/C++.

I did a recompilation of that open C library for my NI-Linux target using this NI-Eclipse. Since Eclipse was new to me, I go to bump here and there to compile the executable. Then I went on to add some Linux shell knowledge (Ubuntu exploration) to execute the executable in the Linux target. Finally, WOW moment came..! The executable is very faster running on NI-Linux RT target than the RT-LabVIEW code in the same target. The algorithm execution was so fast that customer asked us to shift the LabVIEW code as well to C language and run it.
I believe, it’s very little known to our wide LabVIEW community about such Eclipse IDE provided by NI and it’s possibility to expand our boundaries in LabVIEW.
5 good reasons to use NI-Eclipse IDE are:
It’s almost the same Eclipse IDE with compilers specific for NI-ARM/Intel based targets. Those who are familiar with eclipse can go on it very easily. There is a good getting started guide with which you can quickly try it out.

Numerous eclipse users community can help you on most common issues in using the IDE.

Lot of open C/C++ libraries under GNU comes in handy if don’t find same in your LabVIEW function palette.
Examples of which I used are LibPNG, zlib
You can generate executable using Eclipse. Then, it can be executed from LabVIEW using System Exec by running Linux shell commands
You can generate ".so" library using Eclipse. Then it can be called in LabVIEW using Call Library Function Node.

Ajay is a professional developer and architect of LabVIEW applications with extreme interest in getting the hardware connected to LabVIEW and automate the stuffs.  He is also a good mentor for the various interns in his career.  He is ready to help the people in techie roles.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: