LabVIEW

cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Build a generic .exe to run any .vi

We are working with LabVIEW 8.5 and need to run .vi  (not .exe) on remote pc's using vi server. (We do not want to install the full dev. system on these pc).

What we already done (and this works): build an .exe with an empty vi (as it appears if you select file --> new vi)
Running this .exe on the remote pc starts the runtime-engine, even the "empty" vi is not running and let us execute any .vi on this machine as long this exe stays open  --> ok

But: Is there a nicer solution for that? Why we have to build an exe with a empty vi?
Is there not an other possibility to start the runtime-engine an keep it running in the background?


Message Edited by zav on 07-29-2008 04:22 AM

Message Edited by zav on 07-29-2008 04:23 AM
Message 1 of 6
(3,437 Views)
I'm afraid that is the easiest way to do it...

You can of course make a nice splash screen executable that reads the VI to
start from it's ini file... But that is a bit more difficult.

Regards,

Wiebe.


Message 2 of 6
(3,405 Views)
Maybe you could make your empty_vi.exe run as a service
http://zone.ni.com/devzone/cda/tut/p/id/3185
This would avoid to show up the exe, but potentially be a security risk as the vi's you launch may have service privileges and also you might not be able to show FPs at all (as they run as service). But I'm very unsure about that.

Felix
Message 3 of 6
(3,397 Views)
You could have the VI as a dialog which will ask the user for a VI and will then open a reference to that VI and use the Run VI method.
 
Alternatively, you can try registering the .vi extension to the empty application. It might be able to run the VIs immediately.
 
As a third alternative, you can try writing code which will recognize the file which was used to open the application and then run it. I'm not sure how to do that. I don't think the command line arguments property will help, but you should try.
If you search the LAVA forums for tips or tricks, you might come across a post by jpdrolet which shows how to use different ini files for different projects, which might also give you a clue.

___________________
Try to take over the world!
Message 4 of 6
(3,370 Views)
Hi zav,

it does not have to be an exe out of an empty vi, it can be any vi. You just need to have a labview exe on your target pc if you don't have the developement system installed.
With this exe you can run other VIs.
For running applications without labview installed on a pc we have the labview application builder. So you can make a stand alone application out of VIs.
Or you do it like before with running a VI in a exe created with labview. This are the 2 best solutions.
Regards
DianaS
Message 5 of 6
(3,341 Views)


tst wrote:

...you can try writing code which will recognize the file which was used to open the application and then run it. I'm not sure how to do that. I don't think the command line arguments property will help, but you should try.

O.K., it turns out you can do this, but you have to tell the OS to pass the path as an argument. I'll assume you're using Windows. This works on XP, but you might need to do things differently on Vista.
 
Create a VI which will read the command line arguments and use that to open a reference and run a VI. You will need to handle things like broken VIs, etc.
 
Build it into an EXE.
 
Register the .vi extension for that application. If you press the Advanced button, you can add an operation called Open. In the command for that operation you can have to path to the EXE followed by "%1". This appends the file you double clicked as an argument. Look at existing extensions to see exactly how this works.

___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(3,310 Views)