LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple instance executable needs re-entrant VIs ?

Solved!
Go to solution

Hello,

 

i'd want to launch multiple instances of a LabVIEW built executable. I found that it can be simply done just by adding the right line in the .ini file. Ok.

But i wonder what's the behavior of the sub VIs, mostly those which retains some state data in shift registers : do i need to make them re-entrant, or does the multiple instances option automatically duplicate all subVis ?

 

Thanks for any information,

 

Vincent
0 Kudos
Message 1 of 6
(2,530 Views)

Vincent,

 

reentrancy affects the behavior of a VI inside a single execution system. As each EXE generates a dedicated execution system, the subVIs by default run independent from each other.

However, if there are shared resources used in these VIs (like driver dlls) you have to make sure that these resources are protected against race conditions by themselfes. Otherwise, you mustn't run multiple EXE instances concurrently.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 6
(2,524 Views)

Thanks Norbert,

 

is Imaq_dx driver and/or vision a shared ressource ? My app acquire and process images from one camera, and i'd want to use another camera with the other instance of this app...

Vincent
0 Kudos
Message 3 of 6
(2,514 Views)
Solution
Accepted by topic author VdG

Honestly, i don't know.

I ASSUME that each camera session is unique for each process. However, i have no idea if it is possible to open two sessions on the same camera.

If that would work, you could easily mess up the different EXE instance due to re-/misconfiguration of a shared camera. Therefore, i ASSUME that IMAQ prevents multiple sessions on a single camera.

 

Best you try it out. Be careful about picking the correct camera!

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(2,499 Views)

Ok. I'll try and see what happens !

Vincent
0 Kudos
Message 5 of 6
(2,493 Views)

As Norbert pointed You cannot have multiple sessions for the single camera.

 


@VdG wrote:

Thanks Norbert,

 

is Imaq_dx driver and/or vision a shared ressource ? My app acquire and process images from one camera, and i'd want to use another camera with the other instance of this app...


-If your statement is about EXE 1 using camera 1 and EXE 2 using camera 2 then there shouldn't be no issue.

-Be aware of Image buffers though, because when you create and process the image buffers, you are actually using references for the image buffers in memory and make sure you are not overwriting them.

Thanks
uday
0 Kudos
Message 6 of 6
(2,459 Views)