03-06-2008 10:56 AM
03-06-2008 11:11 AM
03-06-2008 12:16 PM
03-06-2008 12:28 PM - edited 03-06-2008 12:28 PM
01-21-2016 10:52 PM
hi,
I have given inputs to .vi file through command prompt using the command
"C:\Program Files\National Instruments\LabVIEW 7.1\LabVIEW.exe" "C:\test.vi" –– 4 5
test.vi is configured for addition operation, now how can i get output to be printed on command prompt
01-22-2016 01:45 AM
01-22-2016 03:12 AM
As Gerd already pointed out you can't do that in LabVIEW directly. You need to develop a LabVIEW application and then build an executable from it.
However process creation under Windows is a pretty expensive thing to do in comparison to Unix variants. That means that everytime the command line process is created it takes some significant time and if you do that often by calling a command line tool repeatedly, this will get slow. LabVIEW as full featured GUI application does add its own extra startup time to this until the entire runtime system is initialized. It doesn't mean you can do it and for occasional commands it's perfectly fine but if you do lots and lots of commands to the tool it really will start to appear slow.
Under Windows the predominant choice for linking application code together is either by using shared libraries, ActiveX components or .Net assemblies. These techniques all have the advantage that the extra component is linked in at load time once and incures the initialization time only then and after that its funcitonality can be called very quickly. LabVIEW supports calling all three of these and to create sshared libraries and .Net assmblies. This might be another possible approach by making your other application the master and link it with a LabVIEW component either in the form of a shared library or .Net assembly.
01-22-2016 04:19 AM
@WilliamLee wrote:
However, it might be useful to create a CLI interface also for testing. The CLI program can be easily scripted using batch files or a makefile. This application has no data acquisition.
If it's just testing that you want the command-line interface for, VI Server and VI Scripting allows you manipulate a VI / LabVIEW executable programmatically while it is running.
01-22-2016 04:34 AM
Thanks for your response.
Is it Possible to call labview from C language.if it is so, is there any APIs ?
can you please let me Know
01-22-2016 06:02 AM
Yes, you can build DLLs in LabVIEW which you can call from other languages and you can also use the ActiveX interface to control/communicate with a LabVIEW application. Of course, you can also use TCP/UDP or any other communications method to communicate between a LabVIEW application and another application.