LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple application instances and multiple devices

Solved!
Go to solution

Hi,

 

I have two apps:
1. The first one collects data from 2 pieces of equipment, which are connected thru COM1 and a USB to RS232 interface.


2. The second collects data from single equipment thru USB interface.

 

 

Questions:
1. Can I run both applications in the same PC? Is there a potential problem?


2. If above is possible, is there a limitation to the number of multiple instances of above applications running in the same PC? Other than the physical ports, resources (i.e. COM ports or USB and RAM).

 

 

Related Questions:
3. Can I run multiple instances of the same application in a single PC?


4. Related to above question –what are the limitations?

 

 

Additional questions:
1. How many USB DAQ devices (i.e. USB 6008) can I use in a single application?


2. Can I run multiple instances of the same application using above DAQ devices?


3. Can I run multiple applications that uses above DAQ devices?

 

 

0 Kudos
Message 1 of 6
(3,945 Views)
Solution
Accepted by topic author frn
I've put some answers to your questions below but based on the type of questions, look into launching clones programatically or create an application that has multiple instance of the VI you need.  Make sure that you select "Reentrant Execution" and "Preallocate memory..." In the "VI properties->Execution".
There is no limit in the number of instance you can run a single VI but you will NOT be able to open the same resource in two different VIs.  If you open the reference once and share it between the clones, assuming that you protect concurrent access with semaphores, you may be able to use the same hardware in multiple instances.


frn wrote:

Hi,

 

I have two apps:
1. The first one collects data from 2 pieces of equipment, which are connected thru COM1 and a USB to RS232 interface.


2. The second collects data from single equipment thru USB interface.

 

 

Questions:
1. Can I run both applications in the same PC? Is there a potential problem?

  Yes.  If you run them in the same project, from source, they will share the memory space.  If you run them both as EXE, they will be completely independant.
2. If above is possible, is there a limitation to the number of multiple instances of above applications running in the same PC? Other than the physical ports, resources (i.e. COM ports or USB and RAM).

 If you rename the file, Windows should let you run more than one instance.  It seems that you can only run one with the same name.

 

Related Questions:
3. Can I run multiple instances of the same application in a single PC?

   See #2

   Alternatively, you could create a simple VI that "launches" new clone everytime you hit a button.  Use the "Open VI reference" with the "reentrant" option followed by "Run VI" invoke method.
4. Related to above question –what are the limitations?

   I don't know if there is one but I've had hundreds of clones of a single VI in the past and the application worked flawlessly.

 

Additional questions:
1. How many USB DAQ devices (i.e. USB 6008) can I use in a single application?

   Why would there be a limit in LabVIEW?


2. Can I run multiple instances of the same application using above DAQ devices?

   You cannot share DAQ devices among applications.  As long as they are all independant, you won't run into toubles.


3. Can I run multiple applications that uses above DAQ devices?

   Same as #2.

 

 


 

0 Kudos
Message 2 of 6
(3,937 Views)

For a built application the default behavior is to not allow multiple instances.  You can add "AllowMultipleInstances=TRUE" to the application.ini file and change this behavior. 

 

If "AllowMultipleInstances=TRUE" is set the only practical limits are how much memory the machine can allocate.  Eventually you will run out of RAM.

 

I believe there is a hardware limit of 255 USB ports (It may be 127) 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(3,923 Views)

Hi frn,

           This is answer to your 3rd question.

 

Open PopUpMain.vi and enter Number of Pop Ups and path and run the application.

Hope this is clear.

 

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Download All
0 Kudos
Message 4 of 6
(3,900 Views)

For your 1st question,

 

1. The first one collects data from 2 pieces of equipment, which are connected thru COM1 and a USB to RS232 interface.

 

How to interface com1 to device. is there direct interface is there ?

 

How many RS232 ports you have ?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 6
(3,898 Views)

Hi Ranjeet_Singh,

 

This was a hypothetical question and thanks to everyone for providing great feedback.

 

 

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