ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
12-14-2009 03:44 PM
Hi, all
I have an application where I need to use two GigE cameras ( Basler Scout, scA-1600-14, 1264*1326 full image pixel) simultaneously in a close loop operation. what I found is that time for getting the two images from the two cameras and finding their centroids takes about 720 mSec. I then did some separated tests for timing each stage and different ways of using Labview. Please see the attached. two IMQAdxs have been set to use config-Grab.vi.
my question:
1) why calling subVi takes nearly 140msec more then directly using the code (see Fig1 and Fig2)
2) how can I reduce the total time for processiing the two image?
it seems to me that the time is doubled for two cameras.
I have to adjust some mirror axes based on the difference of current Image Centroid and Ref-Centrod, and then
acquire the latest images to re-calculate the centroid in the close loop.
I am also puzzled why calling DLL code run in Labview takes about 123mSec.
any suggestion is very appreciated.
Xiaofeng
12-14-2009 04:14 PM
The answer to #1 is likely that your Sub VI is not re-entrant and so if you call it multiple times in parallel they will still have to run in series. You can configure the VIs to be re-entrant to fix this.
I'm not sure the answer to why your DLL code takes 123msec, as you'd have to investigate that code and see why. Is this some code you wrote?
Eric
12-15-2009 05:27 AM
Thanks, Eric.
I checked the config in CIN, two choices for Thread: Run in UI Thread or Run in any thread. I tried both, no difference.
and also when I did the timing test, I only used one CIN to call the DLL. I thought it shall not add another 123ms if I call it from subVI. the code is written by my colleague. I am going to test in C code to see how much the time used for calling it.
I will try to configure SubVIs to be re-entrant.
cheers
Xiaofeng
12-15-2009 07:21 AM
Hi, Eric
I tried to set subVi as re-entrant, see attached. but the timing is still doubled if I call two cameras simultanously.
after setting to re-entrant, I see memory full error when I call the subVi from different options
ie. select option-1: call two camera, labView runs OK, but if I then
select option-2: call one camera, labView displays error, saying "memory full".
see attached.
However, if I select option-1 again, there is no error at all.
did I miss something?
cheers
Xiaofeng