05-31-2009 01:10 PM - edited 05-31-2009 01:12 PM
I would like to save four images (i16 array, typically 250*250) to tiff format.
To enhance the speed of saving, I used parallel structure (with different filename) and reenterant execution option in saving subvi.
In this case, I met the error "not an image" in "write tiff.vi".
Of course, when I used serial structure (released reenterant), four images were saved without this error.
I attach my demonstration this. (conveniently, I used dbl array but I believe it is not related to this error.)
Please run "not an image.vi" to check my problem.
Is it bug of labview or hard to manage four images simultaneously?
labmaster.
*)source codes of Labview 8.6
Solved! Go to Solution.
05-31-2009 08:36 PM
05-31-2009 11:03 PM
I'm worrying about the possibility.
I had better wait for NI's reply to confirm it.
05-31-2009 11:05 PM
I haven't opened your VI, but here's something I've learned about vision.
Many of the vision functions can be used at the same time, to my knowledge. However, you have to remember that LabVIEW Vision is very tight with how it handles images in memory. If you're using the same VI each time, then it is likely that you are using the same image name for the IMAQ Create.VI (IMAQ Create has a string input tht defines how the image is stored in memory). Here's the problem: If the name is the same in each VI, then each VI is working on the same memory location each time. Therefore, if an image is in a different state in another VI, you can cause an error. At the minimum, you run the risk of each VI using one image, rather than each working independently.
If the VI's are used serially, this wouldn't happen because you would reallocate the memory every time, and only after you finished working on the previous image.
My recommendation (unless someone suggests something better) is to allow the SubVi's to have a string input, so that you can wire a unique name to each image as the VI's run. This should allow the programs to run in parallel.
06-01-2009 03:29 AM