I successfully used the following method in LV7.0. It is a bit more complex than you might need since I wanted to communicate between the different instances of the application that I launched, so I made sure they were all launched into the same run-time engine.
- Add the following lines to the INI file of your application
server.tcp.access="+localhost"
hideRootWindow=true
server.tcp.port=3301
socketsetreuseaddr=false
server.tcp.enabled=true
allowmultipleinstances=true
- Add two more files to your application - a launcher and a splash screen. The launcher is responsible for launching the splash screen into a specific run-time engine. The splash screen will launch your actual application using the VI server normally. See the attached image for how to launch into a specific run-time engine. Note that you can set the TCP port to any valid value. My application happens to use 3301.
- Make your application into a VI template. On Windows, just change the file extension from .vi to .vit. Now every time the splash screen launches it, a new instance is created.
As mentioned before, there are lots of ways to shoot yourself in the foot when you do something like this. You have to make your code multi-instance safe. Do not use globals (use dynamically created LV2 globals instead). Make sure code which needs to be reentrant is.
My apologies for not posting code. The only example I have is embedded in a fairly complex application. If I have time, I will try to extricate it and post it.
One last thing to watch out for. The LabVIEW run-time engine continuously monitors whether or not a front panel is open. If all front panels are closed, the engine exits. When you transition from your launcher to your splash screen to your application, make sure one opens before the previous one closes. You can do this using either queues or notifiers.