03-13-2010 03:59 PM
I have a customer who wants to be able to couple Vision Builder AI with hos motorised acquisition system.
I have managed to get VBAI to communicate via Queues (by creating a custom acquisition step). I have a producer and consumer in different VIs.
The producer is set to run in parallel to vision builder while the script reads from the uotput queue. This works great in LV (really fast) but gets kind of slow in Vision Builder. I can get up to 15 frames per second (pre-queued images!) in VBAI 2009 SP1 whereas I get nearly 100 fps in LV alone. If I try to distribute the code as a standalone VBAI custom plugin everything seems to be present (producer is launched, images are queued) but no transfer takes place at all.
I'm about to drop the idea of using VBAI at all for this application unless someonw can help me get some more reasonable performance out of the system.
Regards
Shane.
03-15-2010 04:24 AM
I got it up and running to my satisfaction finally.
There are quite a few caveats regarding shared memory space for custom steps for the VBAI which aren't (to my knowledge) mentioned anywhere.
Now I have a neat way of performing asynchronous data acquisition and processing all from within Vision Builder AI.
Now I need to convince the customer.
Shane.
03-15-2010 08:03 AM
Would you mind sharing the caveats regarding shared memory and custom VBAI steps so we can all benefit from your experience and avoid any pitfalls. Glad to hear you got it working, hope everything else goes smoothly with the project.
Thanks,
Brad
03-15-2010 04:33 PM
It's kind of complicated to go into without getting bogged down with details.
My experience (and please correct me if I'm wrong) is that each and every step of a VBAI script is executed in its own memory space.
If you want to share memory (Queues, Events and so on) then they MUST all originate from the same step of the script.
Also, launching a VI dynamically only allows shared memory if the vi launched (launched dynamically) is included in the build for the script step. I would have really liked to be able to launch any given VI and share memory with it but this didn'0t work for me, I had to actually include it in the build process otherwise it would run, but I would have no shared memory.
Just two of the things responsible for premature non-pattern baldness in my case at the moment.
Shane.