08-03-2018 03:25 PM
Hello everyone,
i wrote a dll using c++ that is able to control my cameras (using winusb and setup api). In labview i made a subvi that lets me use my dll in an easier manner, without always having to initialize arrays where the frame will be written. If i put the subvi that is responsible for capturing frames in a while loop i get an approximate 50 frames per second capturing speed, which is good. Before adding my second camera i went and enabled "Preallocated clone reentrant execution" in VI properties and "run in any thread" in call library function node. After doing so i added the second camera capturing subvi in a separate while loop. Both loops ran at 50hz.
Now the problem is that i want the second camera to take pictures when the first camera is half way into capturing its frame. So while the first camera is taking a picture, the second camera goes midway and also starts to capture a frame. When the second camera is half way into taking a picture, the first camera is taking a frame, and so on. I tried to put a wait vi with half a period but that is very rough, and not precise.
Attached image shows one of the ideas i had, however it did not work. It just made images come at 50hz, so capturing wasnt done in parallel. The start asynchronous call grabs the image, and then its retrieved in wait for asynchronous call.
Thank you for your help. I dont use labview often, im sorry in advance for my lack of knowledge.
08-04-2018 03:53 PM
OK, so you are using Asynchronous Calls, two cameras, are not using IMAQdx (but a third-party DLL), and you attach a picture of part of your code. I won't even bother to look, but can give you some tips (having written a routine that has up to 24 cameras running asynchronously and simultaneously):
Bob Schor
09-14-2018 12:53 PM
Thank you, it worked. Sorry completely forgot to respond!
However my cameras only grab one frame per command. So i just send one command to one camera then wait for half a period and then send command to another camera.
Then i send stop command once i got enough frames.
Thanks again!
09-16-2018 04:27 AM
So you almost have the solution. You are not the only one who might want to synchronize two cameras. We helped you, now it is time for you to help the Community. Attach the routine that "almost works" (so others can see what you've done), and maybe we can help you to finish the "last piece of the puzzle".
Bob Schor