Jump to content

Recommended Posts

Have you read this FAQ?

Can I run multiple instances of LabVIEW?

2013[/snapback]

I believe the question was in reference to running a compiled LabVIEW app, not LabVIEW itself. And if you have to start mapping drives to have more than one copy run that doesn't strike me as very 'clean'.

Personally, I have run into this problem before, however in my situation I had to ensure that only one instance could open--hence no problems. I would be interested in knowing how to spawn multiple instances of the same app also.

Link to comment
I would be interested in knowing how to spawn multiple instances of the same app also.

2014[/snapback]

If you can give me a use case (a possible scenario) then I can show an alternate solution. You have to consider what the purpose of this would be. Would you be talking to different hardware with each executable or common hardware? I think this would be a key factor.

The easiest way to work with multiple exe's would be just to rename them... no? Have the original exe create a copy of itself and then just launch it. Sounds possible.

Link to comment

For this specific case, an application has been built for demonstration purposes, w/ no hardware. The software is modular so that multiple types of demos can be called from the same app. The problem is when you want to compare 2 of the same model or possibly different models.

I understand that there are other ways of accomplishing this specific task, (1 master program calling multiple instances of a slave) but the application has been designed & built and now this functionality has been requested

The expectation is for it to behave, as say notepad does, when you call it twice.

As far as renaming the exe then running it, I have seen it work on my PC but when the customer attempted it, they said that they got two separate apps open, but when a button was clicked in one, both responded to it. Bizarre :blink:

Link to comment

I agree with Mike; Why do you want several instances of the same application running?

If the single application was written correctly - it should handle the job? Are you wanting to create mulitple 'views' of the same data?

If you're creating a demo CD - could you not create a menu/lanching application that will let the user browse and select demos?

You could use HTML to do this too.

You can run mulitple LabVIEW.exe's on a machine - that should not be a problem.

Link to comment

Thank you Mr. Hamilton for the poke in the side.

But the program was written and the customer asked for this specific feature after the fact.

But for those of you interested in the actual answer to the riddle

:ninja: Just found it =8^ )

allowmultipleinstances=True

just throw it into the exe's INI file

works like a charm

Link to comment
  • 2 weeks later...
Thank you Mr. Hamilton for the poke in the side.

But the program was written and the customer asked for this specific feature after the fact.

But for those of you interested in the actual answer to the riddle

:ninja: Just found it =8^ )

allowmultipleinstances=True

just throw it into the exe's INI file

works like a charm

2128[/snapback]

Don't take my poke the wrong way - I've learned a few things overs the years consulting. One is the magic word you can use with clients "No". Sometimes, clients and consultants think we carry some magic bag of tricks and can whip up bug-free solution to a complex problem in no-time.

The reality is sometimes the solution is very simple and direct. It's like having a flat tire - the solution is to 'Get out and fix it' no amount of button pushing on the dashboard is going to solve it.

I too like to keep a poker face when pitched a problem - sometimes it's better to run for the hills.

I'm glad you found a solution..

Regards

Mr. Hamilton (Jack)

Link to comment
  • 2 months later...
do you know, if there's another chance with LV6.0 to get a multiple launchable application?

(except making copies.... ;) )

2403[/snapback]

You can map multiple network drives on your machine, all pointing to your application's subdirectory. You can then create shortcuts to run "MyApp Instance 1", "MyApp Instance 2", etc, etc...

Link to comment
  • 3 months later...
  • 5 years later...

Thank you Mr. Hamilton for the poke in the side.

But the program was written and the customer asked for this specific feature after the fact.

But for those of you interested in the actual answer to the riddle

:ninja: Just found it =8^ )

allowmultipleinstances=True

just throw it into the exe's INI file

works like a charm

This is a cool feature!

Here is the official NI word on it

How can I tell if there is an application instance already open? I have a use case where the customer wants 2 instances of the program. Instance 1 uses com1. Instance 2 uses Com 2. I have the com port info saved in an .ini file. I need the 2nd instance to use a 2nd .ini file.

So I need to detect if there is an instance already running. If so use the 2nd ini file. Any suggestions?

Dan

Edited by ASTDan
Link to comment

You could also lock the INI file while the program is running. When the second instance runs, it checks if the first INI is locked and if it is falls back to the second INI file.

I'd use a command-line switch to pick the ini file instead. I've had locked files get stuck that way when things crash.

Tim

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.