10-25-2012 07:10 AM
Hi,
I found the IMAQ Multi-Core Options.vi and I don't know how to use it. There is no example in LabView. I hope this vi can help me speed up my application. I run a vi on Core i7 machine, maybe there is a chance to speed it up a little bit by this function. Help says that it 'Sets the number of available processor cores to use for NI Vision applications.". So generally, the question is can I use this function to divide processing tasks in parallel threads? If so how to do it?
Or maybe where to find some extended manual for this function and maybe some example.
kind regards,
Marcin
10-26-2012 02:25 AM
Hi bikekowal!
In my opinion you sholud use this VI as it is described in the help: http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_multi-core_options/
The first possibility is to wire a num constant with value 1 to the Get/Set Number of Cores (Get) input, to specify, that you would like to set the number of cores.
Than you should wire a num constan with the value of how many cores you would like to use, to the Specified Number of Cores input.
The second possibility is to use all cores, and wire a num constant woth the value of 2 to the Get/Set Number of Cores (Get) input.
I think you shuold do all this in the initialisation phase of your application, and do not forget to use the error wires.
If you have any questions, please don't hesitate to post them.
Best regards,
10-26-2012 02:49 AM
Hi BalazsNagy
I don't know if I understand it correctly, but does it mean that I cannot use e.g. two cores for one operation and one core for another and all the resources are divided automatically? What kind of functions can I connect with IMAQ Multi-Core Options? Do you have some example?
regards,
bikekowal
10-29-2012 07:20 AM
Hi bikekowal!
Sorry for my late reply.
With this VI you can specify the number of processor cores available to NI Vision API.
So if you run more operations / tasks that use the Vision API, the processor cores will be divided automatically between them.
What do you mean by connecting functions to this VI?
I searched for multi-core examples, but sadly I did not find any. 😞
Here are a lot of vision exmaples: http://www.ni.com/white-paper/6712/en
Maybe in one (ore more) of them you can find some usage example of this VI.
BR,
10-29-2012 07:36 AM
Hi Balazs Nagy,
By saying "connecting functions to this VI" I meant that I could divide processor cores manually. Now, if I understood you correctly all the resources are divided automatically? I'll look at this examples, thank you.
regards,
bikekowal
10-30-2012 03:20 AM
Hi!
In my opinion you can't exactly specify a processor core to a task with this VI. (For example timed loops have these options.)
So with this IMAQ Multi-Core Options VI you can just specify the number of cores that will be used fo NI Vision applications.
Of corse if you run just one application at a time, and specify two cores with this VI, they both will be used by your vision app.
Best regards,
10-30-2012 03:23 AM
OK, I understand. Thank you for help.
regards,
bikekowal