LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

portability of VI's

I want to know about the portability of vi's. If I write a vi for a
LabView 6.1 for windows platform, can I run the same vi in the same
manner under LabView 6.1 for the Linux platform? (Assuming the same
hardware and such). The specific case I am thinking of is a computer
that dual-boots linux and win2k, and runs LabView under both, so the
hardware will be exactly identical.

My general question is, are LabView .VIs portable across different
platforms and architectures?

Thank you in advance,
0 Kudos
Message 1 of 3
(2,583 Views)
Yes, but there are a few considerations.

(1) The first one that is likely to affect you is file paths. Never use strings to store file paths, as constants. The path separator ("\", "/", ":") is platform dependant. If you use a path data type to store your paths, as constants, then LabVIEW will automatically convert the path separators when it recompiles the application for the new target platform. If you store them as string constants, LabVIEW wont convert them.

(2) If you call shared libraries you need to make sure that you have a .so file in Linux, a .dll file for windows, and a .shlb file for Mac. The call library function will load whichever one it finds if you use a "*" character as the file extension when specifying the library path in your
Call Library Function node. For example, "MySharedLibrary.*".

(3) Don't use ActiveX; it isn't available on Mac, or Linux. LabVIEW's 3D Graph is an ActiveX Control, and won't work outside of Windows. Also, there are some LabVIEW add-on Toolkits, like the Database Connectivity Toolkit, that are windows only because they use ActiveX.

(4) Linux (and Solaris) has Pipes VI, windows doesn't

(5) Only windows has Windows Registry VIs

(6) If you use the Dialog Controls in your application, their appearance will change depending on the platform.

(7) Font problems are notorious, things resize and don�t display right, always. There are several methods of working around this problem, by choosing proper fonts, but none of them are perfect.

(8) You stated that they have the same �hardware and such�. NI doesn�t provide drivers for most of their hardware in platforms other than Windows. Even if drivers exist for Linux, most likely you will need to call different VIs in LabVIEW, t
han you will in Windows.

I am sure that there are a few more issues that I missed, but someone else will post them, no doubt.

Good luck and happy cross-platform wireworking,

-Jim
Message 2 of 3
(2,583 Views)
I forgot about End of Line (EOL) characters:

Windows uses CRLF "\r\n"
Linux uses LF "\n"
Mac uses CR "\r"

If you write routines for writing and reading files, this will be a concern for you. Most of LabVIEW's high-level File IO VIs have an input for converting the EOL characters to the system EOL when writing and reading. Also, LabVIEW has an "End of Line Constant" string constant that will output the correct EOL character for the system. Use these features instead of simply hard-coding the EOL of a specific platform.

Good luck,

-Jim
0 Kudos
Message 3 of 3
(2,583 Views)