LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing external code into LabVIEW

I am in the process of develpoing a genetic algorithm code to incorporate with LabVIEW in order to control a pulse shaper. The code I am trying to develop is the GENESIS code. The original version of this code was developed to run under UNIX. Eventually I want GENESIS to be able to communicate with LabVIEW (which I am using to control my laser) . LabVIEW software is designed to run under windows. Will I need to convert the GENESIS code into a Windows format or can I leave GENESIS in its UNIX form before importing it into LabVIEW.
 
Any ideas?
 
Thanks
0 Kudos
Message 1 of 6
(3,401 Views)

Hi alanhomer,

Where will the GENESIS code be running?  If it runs on a Unix server, then it can remain in that format.  If it will be running under Windows, then it has to be converted and functional before you include it as part of Labview. 

What is executing the code?  Is it the host PC? This will determine if you have to create an executable, a dll, an image, and so on.  Labview can work with any of these.  However, how to implement the solution in LV will be based on how the solution is ported to the PC (Windows) or if it is run from a Unix machine.

Ray

Message 2 of 6
(3,394 Views)

Thanks, the code will be ran from a windows PC so it looks as though I will have to modify the code then. The host PC will be executing the code.

 

Thanks again.

 

Alan

0 Kudos
Message 3 of 6
(3,385 Views)

Hi Alan,

When you have code running from Windows, there are a few scenarios to choose from.  The two most common are running executables (.exe) or calling libraries (.dll).  I am sure that you are familiar with both.  I simply want to mention that LabVIEW handles the two in a different fashion.  You can experiment with both and decide how you wish to proceed.

Executables:  LV calls the executable by using "System Exec.vi"

DLL's:       LV calls the functions using "Call Library Function.vi"

I personally prefer using the dll. 

Ray
Message 4 of 6
(3,375 Views)
Just to make sure you have the appropriate guide:

Using External Code in LabVIEW

Regards;
Enrique
www.vartortech.com
Message 5 of 6
(3,365 Views)
FYI, that document is no longer being revised. As of LabVIEW 8.0, you can find that content in the LabVIEW Help by navigating to the Fundamentals»Calling Code Written in Text-Based Programming Languages book in the Contents tab. The same content is also available at ni.com.

Message Edited by KellyH on 10-18-2006 02:25 PM

Kelly H
LabVIEW Documentation
National Instruments
Message 6 of 6
(3,194 Views)