PDA

View Full Version : Problem in MemorySnapImage with LabView



Vostok
April 1, 2011, 11:37:39
Hello,

I'm trying to develop a labview software for acquiring images and videos with DFK 41. Until recently I successfully used the Grab Picture.vi to capture and save a LabView picture. Now all I get when running the VI in my software is the generic error message "You called a property that's unavailable, e.g. setFlipH" etc. The error rises inside the Grab Picture SubVI in the invoke node calling the MemorySnapImage method.

I found that some others have had this same problem in 2006 on this forum in other programming languages but received no solutions.

I'm also having trouble with saving the captured AVI's, but will get back to that problem once I've got the image capturing figured out.

Any ideas where to look for a solution?

Lauri

Stefan Geissler
April 1, 2011, 13:30:11
Hello,

Do you know exactly where the exception is thrown? Can you please debug this to find the position?

Thank you

Vostok
April 5, 2011, 10:59:39
Hello,
Do you know exactly where the exception is thrown? Can you please debug this to find the position?


What kind of info do you need and how can I generate it?

I attached a screenshot of the GrabPicture VI block diagram and annotated the node which generates the error.

The problem arose when I first tried to run my software at another computer and is now present in both of them. A clean install of IC didn't fix it.

Please advise how to supply relevant debug data?

Lauri

Stefan Geissler
April 5, 2011, 11:51:48
Hello,

Thank you for the image. Do we know the error text? I think, it must be somewhere in the pink lines. I am not a LabVIEW programmer, therefore, I can not tell you, how to do error handling in LabVIEW.

Vostok
April 5, 2011, 13:28:27
Yes, the error goes along the pink lines and if a node (in this case the MemorySnapImage invoke node) produces an error, the following nodes that take the error pipe as input seize to operate and instead pass the error forwards to the error handler in the end of the pipe.

The error message reads:

Exception occured in IC.ICImagingControl3.1, An option is not available, e.g. you called setFlipH and the VideoCaptureDevice does not support flipping. in IC_Grab_Picture.vi->RecordStillVideoNothing.vi->GeneratorControl.vi

where GeneratorControl.vi is my main software, and RecordStillVideoNothing.vi my own wrapper for the Grab Picture vi.

This seems like a generic error message of some sort. Like I said, I found one support request from these forums regarding the same issue of receiving the exact error message above when calling MemorySnapImage() in some other programming language. The date was around 2006, will have to check if I'll find it again for reference. That makes me think that this would not be a LabView specific issue.

By the way I got the snapping to work when reproducing the simplest kind of recording VI as walked through in the IC labview documentation, but my bigger software still refuses to work.

At the moment I've found no indication of any configuration being different in these two cases. Have you got any idea of what kind of situation might cause MemorySnapImage to throw an exception? This might help in hunting for the bug.

Lauri

Stefan Geissler
April 5, 2011, 15:31:46
Just a question: You do not Avicapture simultaneously, right?

Vostok
April 5, 2011, 15:44:17
Not simultaneously, no.

As I said, I've had some strange issues with avi capture but I suspect them to stem from bad codec settings and such and decided to fix them only after I've got the still image capture working.

Lauri

Stefan Geissler
April 5, 2011, 16:58:17
Does the "LabVIEW Picture Example", that was installed with the extension, run on your computer?

Vostok
April 6, 2011, 14:11:43
Yes, all the supplied demo VI's work and furthermore, I built a function to my software to restore the device state from the same .dat files used to load the demo VI's, to no avail.

I'm really not doing much else in configuring the camera in my software compared to the demo programs. Mostly some scaling of the live view window and such. I'll experiment further to see if I'll manage to spot the bug.

Lauri

Vostok
April 6, 2011, 15:03:00
Success!

The problem was fixed by removing the IC Control from the frontpanel and replacing it with a new one. So I suspect there were some residual configurations that sticked to the control even when I deleted those from my Labview code. I'll now slowly add the functionality back and report if I'm able to reproduce the problem.

And, once I get everything with stills figured out I'll be back to bother you with AVI recording problems. ;-)

Lauri