11-27-2012 05:58 PM
Hello,
I am working on solar cell as my final year project and I have to use LabVIEW. I need to import the picture into the LabVIEW, those images are tiff. files. I am using NI IMAQ to this and made a VI and there is no mistake but still it is not showing the picture on the screen panel. I have attached my VI. Please help me in this matter.
Thanks
Regards
Jawad
Solved! Go to Solution.
11-28-2012 02:42 AM
Jawad,
There is already a forum post on this issue try and find the solutions offered by that.
11-28-2012 06:12 PM
hi,
I have read this thread and found a lot of information but as I have shown my VI. I have made an effort on this but somehow image is not showing up. I want help in my VI. Can someone kindly look at my VI and guide me through where I am wrong and which part need to be fix.
Jawad
11-29-2012 08:09 AM
Dear Jawad.Zafar,
I hope you are well.
I have taken a look at your application and did a bit of work on your code to get it to display your image on the front panel.
There were just a couple of minor changes required in order to get the code to work.
Firstly, you were using the incorrect function 'IMAQ Read Image and Vision Info'. This produced error -1074395989 (Unable to Read Data).
You need only use the function 'IMAQ Read File'. This will read nearly all image file types, such as PNG, TIFF, JPEG etc.
Once I made this change I found another error; error -1074396080 (Invalid Image Type) on the 'Extract Tetragon' function. This was because the 'Image Type' control was set to 'Grayscale (U8)'. This type needs to match the image type specified at the first 'Image Create' function; Grayscale (U16). Once I changed this to the correct type, the code executed without any errors.
I would also suggest putting a STOP control for your while loop, otherwise you will constantly produce the image on the front panel and will never be able to do other processing.
The way in which to do this is use an OR function and create a stop control on the front panel. This is connected to the error terminal of the while loop, changing it to a stop terminal. This way if an error occurs or if you select the stop command, the program can be stopped.
I have included an amended copy of your code with this post.
I hope this is helpful to you and the rest of your application goes well.
Kind Regards,
11-29-2012 03:41 PM
Dear Dominic,
Thank you very much, this was a very kind help. I will use the stop button in future. Once again thank you for the help. I will use the forum again, if I need more assisstance.
kind regards,
Jawad