05-25-2012 10:45 PM
Dear all
I try acquire and save image from Basler camera L301kc and NI PCe 1427 framegrabber. I create a producer/ consumer loop because the save take more time that the acquisition and if I do both in the same loop I lose frames. But I have problem: only producer loop run.
I have read all the threads but I didn't manage to solve my problem.
I have attached a VI code of how I was trying to do it. I am using LabView 2011.
Please any comments or help is deeply appreciated.
Thank in advance
XuanThuy
Solved! Go to Solution.
05-27-2012 10:25 AM
You have the stop button wired from one loop to the other. This means the second loop will not start until the first loop stops, due to data flow. That means your consumer loop doesn't start until the producer loop ends. Also, you have the error wire from the consumer loop wired to the destroy queue vi. This means the queue won't be destroyed until after the second loop finishes. There could be other data flow issues, but I only took a quick look.
Bruce
05-29-2012 02:49 AM
Dear Bruce,
Thanks for your help. I try edit vi code. The consumer loop has run .But I don't find error from the consumer loop wired to the destroy queue vi.Can you help me ?
05-30-2012 08:38 AM
Hi XuanThuy,
Can you provide more information about what doesn't work in this VI? Do both the producer and consumer loops run no the way that you expect them to? Are you still noticing any data flow issues? Please let us know what you are still having problems with and post your updated code so that we can help you to troubleshoot better. Thank you!
Regards,
Kira T
05-30-2012 09:37 PM
Dear Kira T,
The producer and consumer loop has run but the Image Out in consumer loop is empty. Bruce attention to the error wire from the consumer loop wired to the destroy queue vi. But I don't find error.
I have attached a new VI code.
Can you help me ?
Thanks and regards
XuanThuy
05-31-2012 07:50 PM
Hi XuanThuy,
When you run the program, do all 10 images appear in the image display on the front panel? Are you probing the image out wire when you run the program to make sure that the issue is that there is no image in the Image Out and not that there is no File Name?
This may also be caused by a data flow issue. If you place an image display right before the Bundle By Name function is there an image that you can display? Because images in LabVIEW are pointers to memory locations, it seems like you are actually erasing the image before you are processing and saving it.
Regards,
Kira T
06-02-2012 10:14 AM - edited 06-02-2012 10:19 AM
Dear Kira T,
Thanks for your help. I has tried correct program by remove an image display right before the Bundle By Name function.The probe of Image wire when I run program show Image with File Name for 10 frame. But the error out 1 have status code ERR (-1074396120) - "IMAQ Set Image size". In the consumer loop, the probe of Image after Unbundle1 By Name function show only File Name. Image out is empty and error out 2 have status code ERR (-1074396120) - "Write JPEG file".I don't find the error in program.
I have attached a new VI code.
I appreciate for your kind help.
Best Regards,
XuanThuy
06-04-2012 09:46 AM
Hi XuanThuy,
I think that you are still seeing a data flow issue here. It seems as if you are destroying the image memory location before you are actually taking the image out of the queue. Have you tried to move the dispose image to the consumer loop? This way you will not delete the image memory location until after you have processed them in the consumer loop.
Regards,
Kira T
06-05-2012 03:09 AM
Dear Kira T,
I don't understand. What are move the dispose image to consumer loop ?. Can you correct direct to my vi code ?
Pls. hepl me
Regards,
XuanThuy
06-06-2012 10:52 AM
Hi XuanThuy,
Attached is the location of the Dispose VI in your program. It is currently located in the producer loop. I think that it would help for you to move this to the consumer loop, so that you do not remove the image from memory before you save it to jpeg. Please let me know if this helps with your program. Thanks.
Regards,
Kira T