Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing same imaq buffer between two exe?

Hi there, in need of some guidance here.

Due to certain reasons, I need to build two executable files from Labview. (to set different CPU affinity)
The second exe is processing image output from first exe. These is done through network shared variable as for now. Which is actually quite slow.

 

Is there a way that second exe can refer to buffer in first exe? for example image pointer?

 

Appreciate any input.

 

Rgds,

Winston

0 Kudos
Message 1 of 6
(3,604 Views)

I sometimes do that using VIServer calls.

 

In the EXE that acquires the image, I place the IMAQ image buffer in a FGV and from the second EXE, I make a call to the FGV vi to receive the IMAQ image buffer.

 

I've never tried with network variables so I can't compare performance.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

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

I am not sure about sharing IMAQ buffer between PCs, as i understand the memory for image will be allocated in local PC. And trying to access something in remote machine to process it might even take more time.

 

How much is slow? What is the image type and size? What is your network type and speed?

 

Actually you can try Network streams which will provide efficient data streaming.

-You can get more info on choosing the right netwrok protocol based on requirement: http://www.ni.com/white-paper/12079/en/

-About Network streams https://zone.ni.com/reference/en-XX/help/371361M-01/lvconcepts/networkstreams/

Thanks
uday
0 Kudos
Message 3 of 6
(3,570 Views)

Hi TiTou & Udka,

 

Im trying with the FGV method. Following are my findings...and kinda expected findings...

FGV works across different vis if they run within the same project file.

FGV will also work when I select both vi and build together as one exe.

 

However when vi1 and vi2 are build separately, FGV will not work as expected.
As they are treated to be in their own preallocated memory space?

 

I have attached a project file to explain better the situation. : )

 

*many thanks guys

0 Kudos
Message 4 of 6
(3,567 Views)

See this on how to share a FGV between 2 apps

 

It also works to share between EXE that run on different computers, I'm pretty sure Vision Builder also uses VIServer to transfer images between RT Vision targets and computer.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 6
(3,551 Views)

take look this link may be it could solve your problem 
http://digital.ni.com/public.nsf/allkb/70A5D11517DBA50C86256E6A0070E5A7

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