LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visa windows on linux, maybe with wine?

Hi, I have a vi developed on Windows XP (LabVIEW 8.0 and VISA 3.4.1)  that I built into a windows executable and can run using the runtimes on an old Windows laptop (366 MHz, 64MB RAM- feel my pain?).

I would like to be able to re-build it (use it) on a Linux (Mandriva 2007, but I'm flexible here) machine. Possibly, I'd like to avoid installing the whole professional version on the Linux machine and build it with App Builder for linux- don't want to kill a fly with a canon (plus the linux PC is also oldish... P3 @ 1 GHz, 256 MB RAM - not exactly a development system workhorse)

I tried to install first the latest wine (0.9.47) emulator, but then the windows visa runtime  installer bombs (I can be more specific).  I could install  LV 8.0  runtime  for linux  with no problem; also  possibly  to  get the  visa  runtime  for lilnux installed  (but  I'll  need  to  get the  kernel sources  for Mandriva 2007 - probably kernel 2.6.17 -yuck- just to compile a few lines of code from NI to get NI-KAL working- that is my problem from the first try to install VISA 3.4.1 runtime for Linux)

My question: is there an easy / elegant way to convert and run my app (basically a driver that dumps commands on the serial port)  from the windows version  to a linux version?

If push comes to shove, I could probably forget about VISA and LabVIEW and go back to C and TCL-Tk for the interface, but I'd hate to reinvent the wheel. 
0 Kudos
Message 1 of 4
(3,844 Views)
If you want to take a VI that uses VISA and run it on Mandriva 2007 you have at least two options.

1.  Install LabVIEW for Linux, and NI-VISA on the Linux machine that will run the VI.
2.  On a Linux machine use the LabVIEW Application Builder to build the VI into a Linux application.  Then on the machine you want to run the VI you would need to install the LabVIEW Runtime Engine for Linux, and the VISA Runtime Engine for Linux.

Note that option 2 is using the Linux Application Builder (which runs on Linux).  If you build the VI into an application on Windows it will produce a Windows executable not a Linux executable.

You mentioned using WINE, but there is no need to use WINE since there are native Linux versions of LabVIEW, the LabVIEW App Builder, and NI-VISA.  Of course you do need to purchase LabVIEW for Linux, or the LabVIEW App Builder for Linux.

You also mentioned the hassle of installing the kernel source to allow NI-KAL to compile.  Technicaly you only need the kernel headers for you currently running kernel you don't need all of the kernel source.  I don't remember if Mandriva has a specific kernel headers package, but I think they might have a kernel source stripped package which is smaller.  Additionally if you are only using NI-VISA for serial, you actually don't need NI-KAL.  If my memory serves me correctly the NI-VISA INSTALL script has a --nokal and --nopal option, so you could try something like:

./INSTALL --nokal --nopal

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 2 of 4
(3,817 Views)
Thank you for your comments. Old Mandrake used to have a kernel-headers package, I do not think Mandriva still does.

Unfortunately, all the Linux machines are production servers, so I'll probbaly have to install the whole thing on my rather old machine (we do have an academic site license, and probably I assume there is somewhere the Linux version available).  But just to make sure I understand it correctly (and I think I do): the runtime (be it LabVIEW, Visa, etc.) needs an executable to run, right? It cannot take just a vi and run it, unless you use the App Builder to make it into an executable - right?
0 Kudos
Message 3 of 4
(3,798 Views)
That's right.  VIs only run in the development environment.  Running an executable (which is built with Application Builder on the development machine) on a target machine requires the runtime engine.  Executables that use the VISA API require both the LabVIEW Runtime engine and the VISA Runtime engine.
Regards,

James R.
National Instruments
0 Kudos
Message 4 of 4
(3,789 Views)