PDA

View Full Version : Error Related to FrameFilters in LabView



Andy Hunter
December 21, 2011, 05:45:13
Hi,

I have a DMK 41BU02.H camera that I'm learning to program in LabView. So far, I've built a VI similar to the one described in the "Getting Started" part of the documentation. It has an IC Imaging Control, a button to capture an image and plot it as an intensity map, and a button to stop the program.

I also added an ROI filter, since that's something I'll need to use down the road. Without the ROI filter, it works great. With the ROI filter, it works the first time I start the VI, but fails if I stop and restart. The failure occurs in IC_OpenDevice when it tries to set the MemoryCurrentGrabberColorformat property of the ICImagingControl object. The error message I get is shown in one of the images below, but it isn't very descriptive.

1440
1442
1441

The Debug image shows where the first error occurs in IC_OpenDevice

As you can see, I'm using IC_Clear.VI to reset some properties of the ICImagingControl when my VI starts and stops. I read another thread here where that was recommended as a solution to a similar problem. All that IC_Clear does is stop live display, clear the FrameFilters chain, and set ICImagingControl.Device to null.

Does anyone have any advice? Should I reset some other things in IC_Clear?

I'm not that familiar with ActiveX or how it works with LabView, so I've run out of ideas to try. Is it possible to issue a command to completely clear the ICImagingControl object and start from scratch? One (poor) solution I've found is to manually delete the control and replace it from the IC LabView Extension palette before restarting the VI. That works, but obviously I don't want to do that every time.

Other Info:
LabView Version: 8.5
Windows: XP Pro 2002 Service Pack 3

Thanks,
Andy

Stefan Geissler
December 21, 2011, 09:59:10
Hello Andy,

From my point of view, you did all correctly. I just wonder, what the last VI, the one with the "C" in the VI is. I am not a LabVIEW expert, therefore, I do not know this.

The "IC_Clear" VI is supposed to stop the live video stream and remove the frame filters. I have the faint suspect, that it does either not stop the live video correctly and can not remove the frame filter or it simply fails to remove the frame filter.

The problem of LabVIEW is, that it does not stop and reset the ActiveX when debugging has ended. That means, it is not cleared at all.

Andy Hunter
December 26, 2011, 03:53:51
Hi Stefan,

Thanks for your reply. It sounds like this is a problem I should take up with NI. Your ActiveX control seems to work great ... I just need to get LabVIEW to work with it.

Cheers,
Andy

sitejasshah
November 27, 2012, 09:22:51
I saw similar behaviour when I first tried the SET ROI vi. It would work the first time that I run the labview vi.
But it would give me " error -2146959355 server execution failed " at the IICImagingControl.MemoryCurrentGrabberColorformat in IC_OpenDevice > IC_RestoreState when I tried running it the next time. It would freeze labview and I would have to kill it from task manager before I can run it in labview again.
Like someone mentioned in the previous post, I can delete and re-insert the ICImagingControl from the vi to get it working. But that is tedious.
I simply used the IICImagingControl.LoadDeviceStateFromFile method instead of the IC_RestoreState vi to load the settings from my setup file.
Now the SetROI vi works well without any errors.
Thank you for other posts on similar topic. They helped in arriving at this solution.