11-19-2011 04:55 AM
Dear Lab VIEW Engineer
I used lab VIEW to make machine vision system.
The analog mage graber from interface with max frame is 30 /s was used.
I am using computer with Core i7 3.4 Ghz, 8GB Memory and windows 7 32 bit.
My question is, why maximum calculation for measurement is only 15 data/s?
How to increase up to 30 data/s?
Herewith the machine vision program to capture the image and for image processing.
Thank you
Best regards
Sugeng
11-21-2011 12:35 AM
Dear sugeng
I examined your VI but there are many ways you can improve the performance.
Firstly, you have a while loop enclosing the whole code which may lead to unnecessary code repetition.
You seem to be using an old IMAQ VI to acquire images from a camera,
but VIs such as ImgOpen.vi should able to be left outside the loop.
Especially if there is an ImgClose.vi, you should be able to leave those two VIs outside the loop
and only call them when you start and finish the code.
The same can be said for IMAQ Create and IMAQ Dispose.
IMAQ Create creates a buffer for an image so it takes some processing time.
You seem to be trying to use the same buffer for your image,
(i.e. once processing is completed, you do not need the image from the previous loop)
but if that is the case, I suggest leaving IMAQ Create and IMAQ Dispose outside the loop,
in order to use the same image buffer and not keep recreating it.
You have successfully done this with your File I/O function so you should do the same with other functions.
However, in terms of memory performance, I suggest placing a Close File function outside the loop after writing into your file.
If you do not close your file after opening it, this may lead to memory leaks and file access issues.
You can find the Close File in your functions palette; Programming>>File I/O.
On a memory performance note,
you have some coercion dots (the red dot displayed on an input of a function/VI) near the end of your code,
but they take up memory and may in turn decrease the performance of your VI,
so I recommend converting wires to appropriate datatypes before connecting them to inputs with a different datatype.
You can use the functions in Programming>>Numeric>>Conversion from the functions palette.
Kind regards
Taiki Hoshi
Applications Engineer
NI Japan