10-05-2006 01:31 PM
10-06-2006 12:11 PM
Hi Neville,
If you doing image processing, then you are probably using VIs that call the NIVision DLL. These calls are actually reentrant by default (calls made to the IMAQ DLL are also reentrant). Having said that, remember that the image processing VIs, along with most VIs in the vi.lib folder, are not reentrant, making the DLL calls effectively non reentrant as well. The reason for this is that, unless a VI takes a considerable amout of time to execute, running it as reentrant will often slow down performance due to the overhead involved in managing parallel execution. I'm not sure if you have already tried this, but you may find that your program will run faster if you set your image processing VIs to be non reentrant. I do not know of a way to run multiple instances of the same reentrant VI on different threads, but I will look into it, and I will let you know if I find something. Another option would be to create copies of the VIs so that the functionality of each one is identical, but you are actually calling different .vi files.
In general, it seems like the architecture of your program is very optimized with the parallel loops, queues, and notifiers that you are using. I would recommend trying out non reentrant VIs to see if this speeds things up. Please let me know if this is helpful.
Chris
Applicatoins Engineer
National Instruments