LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Announcing the LabVIEW 64-bit Pioneer Beta


I was planning on developing a free SQL Database toolkit for LabVIEW on GNU/Linux that uses unixODBC and/or MyODBC.  The only reason why we still run Windows on our test stations is because that they need to interface with SQL databases.


Why not try:

sql-LV which is exactly as you describe?

0 Kudos
Message 31 of 46
(3,034 Views)

I think the only place for 32-bit these days is for netbooks and embedded stuff.


Most computers sold today (desktops and laptops) run 32-bit OSes. It is actually still rare to find 64-bit OSes installed. We focused on Windows first because we have more customers who run Windows than Linux (by far), and the types of applications which we believe will get the most benefit from a 64-bit LabVIEW include drivers which we do not support on Linux. We do hope to expand our 64-bit support to other platforms in the future, though.

 

In the meantime there are various approaches to solving your problem. One is to install or build a 32-bit .so to do what you want to do. I don't know much about unixODBC, but the only  DBMS I've used on Linux (MySQL) actually uses a TCP/IP interface, so even the command-line client is really just making a network connection to the server. If that's the case then a 32-bit .so should work just as well, even if connecting to a 64-bit server process.

 

Another approach (much harder) is to do what Firefox did to support 32-bit plugins in 64-bit Firefox: make a 32-bit .so that launches a 64-bit process which loads the 64-bit .so and communicates with your 32-bit .so using any form of inter-process communication you want (file I/O, named pipes,TCP/IP, etc.). It's not ideal, but it works.

 

You could also skip the 32-bit .so and implement the same logic in LabVIEW itself, or you can figure out how myODBC works under the hood to communicate with the server and implement that protocol directly in LabVIEW.

 

None of those are fun to implement, but they can be done.

 

Thank you.

0 Kudos
Message 32 of 46
(3,017 Views)

dgholstein wrote:

I was planning on developing a free SQL Database toolkit for LabVIEW on GNU/Linux that uses unixODBC and/or MyODBC.  The only reason why we still run Windows on our test stations is because that they need to interface with SQL databases.


Why not try:

sql-LV which is exactly as you describe?


Great suggestion.  Thank you very much dgholstein.  I'm surprised I could not find this toolkit when I executed several advanced Google searches.  I searched for keywords like: SQL labview Linux unixODBC MyODBC.

 

This is great since using sql-LV will save me a lot of time not reinventing the wheel.  I just did some tests.  sql-LV works on my 32-bit Gentoo GNU/Linux box, but not on my 64-bit Gentoo GNU/Linux box.  sql-LV also requires the LV 7.1 RTE.  On my 64-bit box, LV complains that "it couldn't load the sql_LV.so shared library" that comes with the package.  I'm assuming this is because it is a 32-bit library.  So I'm still out of luck using LV on a 64-bit GNU/Linux box.  It would be nice if NI made LabVIEW fully compatible with 64-bit GNU/Linux installations.

0 Kudos
Message 33 of 46
(3,016 Views)

Richard Ballantyne wrote: 

 

This is great since using sql-LV will save me a lot of time not reinventing the wheel.  I just did some tests.  sql-LV works on my 32-bit Gentoo GNU/Linux box, but not on my 64-bit Gentoo GNU/Linux box.  sql-LV also requires the LV 7.1 RTE.  On my 64-bit box, LV complains that "it couldn't load the sql_LV.so shared library" that comes with the package.  I'm assuming this is because it is a 32-bit library.  So I'm still out of luck using LV on a 64-bit GNU/Linux box.  It would be nice if NI made LabVIEW fully compatible with 64-bit GNU/Linux installations.


Well, it works on my OpenSuse 64-bit systems.  The source is all there -- you need to install the 32-bit MySQL and UnixODBC drivers for your distribution and link to that, the gcc "-m32" command line option forces generation of 32 bit code compatible with LabView 32 bit.  When LabView goes 64 bit, we'll simply have to re-compile.  You'll see my name all over it since I developed it over a 5 year period.

 

I've recommended, and Adam Kemp touches on the subject, that 32 bit LabView needs the ability to call 64 bit SOs, similar to how 64 bit Firefox can call 32 bit SOs.  I'd say most people (>95%) have no need for the types of data handling capability promised in 64 bit LabView, but I'd wager >50% of us users will need to call a 64 bit SO from our apps.  We work around the issue by installing 32 bit libs in addition to the 64 bit libs;  I do this with MySQL, UnixODBC, GSL and Linux-GPIB -- pain in the butt.

 

   ...Dan

0 Kudos
Message 34 of 46
(3,008 Views)
A 32-bit LabVIEW can ONLY load a 32-bit .so, so that's not the problem. Try running ldd on the .so and see if it's missing some dependencies.
0 Kudos
Message 35 of 46
(2,996 Views)

Adam Kemp wrote:
A 32-bit LabVIEW can ONLY load a 32-bit .so, so that's not the problem. Try running ldd on the .so and see if it's missing some dependencies.

What's not the problem?  LabView 32 running 64 bit SOs is feasible, but not implemented (AFIK) -- an intermediate 32 bit SO can be made to call a 64 bit SO (though TCP/IP or IPC or such) to pass and return arguments in a 64 bit server-type application; messy, but feasible.  If I were really smart about the loader, I'm sure it'd be feasible to do it more directly.

 

Of course he's missing dependencies, I know what they are since I wrote those SOs, namely 32-bit MySQL and UnixODBC APIs.   Using Yast, I'd install mysql-devel and mysql-32bit and the same with UnixODBC; I don't know the equivalent for his distro.

0 Kudos
Message 36 of 46
(2,987 Views)

What's not the problem?


He is running 32-bit LabVIEW, and he has a 32-bit .so which will not load. It's not because it's the wrong bitness. It's the right bitness. It probably won't load because it's missing a dependency, and that's probably because he hasn't installed the 32-bit version of those dependencies. If he can get everything the .so needs in 32-bit form installed to the right place then it should work just fine in LabVIEW.

0 Kudos
Message 37 of 46
(2,984 Views)

Adam Kemp wrote:

What's not the problem?


He is running 32-bit LabVIEW, and he has a 32-bit .so which will not load. It's not because it's the wrong bitness. It's the right bitness. It probably won't load because it's missing a dependency, and that's probably because he hasn't installed the 32-bit version of those dependencies. If he can get everything the .so needs in 32-bit form installed to the right place then it should work just fine in LabVIEW.


 

Exactly.  All my shared library dependencies are 64-bits.  I need to recompile 32-bit versions of them all using the -m32 compiler flag.  I'll work on that later this week when I have some more free time and let you know how it goes.  Thanks very much for sharing the link to  sql-LV.  It looks like it is coded quite nicely.

 

Richard

 

0 Kudos
Message 38 of 46
(2,975 Views)

The problem gets worse when one doesn't control all of the dependencies. For instance, I have the following two use cases in Linux:

 

1) A shared library written by me which calls a third-party shared library (libhdf5.so).

 

This case is only a little annoying. I must make sure that my system has a 32-bit version of libhdf5 (in /usr/lib32) AND all of libhdf5's dependencies. It's the fact that the whole dependency chain has to be 32-bits which is the real gotcha. Surmountable, but annoying.

 

2) A shared library which interfaces to the python interpretter

 

This is much more problematic. Since I'm calling another language, not only does the python implementation library have to be 32-bits, but so does the rest of the python distribution. Many of the packages one may call (in the python code) are implemented in shared libraries. As far as I can tell (with only minimal investigation at this point) there's no way to install both 32-bit and a 64-bit python distributions. Even if it's possible, it's certainly not desireable, as it would make managing the python installation a nightmare.

 

Clearly the best solution is for a 64-bit version of LabVIEW to run on 64-bit OSes.

 

Jason

0 Kudos
Message 39 of 46
(2,817 Views)
I have a 64-bit Intel machine running Windows Vista 64-bit OS. I also have a 32-bit Labview GSE application that was developed on XP 32-bit OS with Labview 32-bit. I tried loading Labview 32-bit and tried loading the application and it brought the system to a blue screen. OOPs! I am guessing that I need to either get Labview 64-bit beta or get XP 32-bit for my 64-bit Intel machine. What do you think are my options. A bunch of the drivers for  the application are 32-bit Labview drivers. Rather than going through what Brian went through in porting Labview to 64-bit with porting my Labview 32-bit application should I just surrender and go 32-bit?
0 Kudos
Message 40 of 46
(2,591 Views)