Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Application crashes when camera mode 7 is set

Hi, I have written a small application that grabs images from the camera. The application also allows user to change the video modes and the ROI But I have a problem. Whenever I try to set mode 7 the application crashes. I am also handling the exception but it doesn;t go there. It simply crash. So can anybody help! I

 

Thanks Farhat

0 Kudos
Message 1 of 6
(7,086 Views)
HI Farhat,
 
There doesn't seem to be any error handeling in your code at all.
Without this it's going to be really difficult to actually narrow down your problem.
If you try adding this into your code you might find that the error presents itself.  If not post back with the new code and I'll have a look at it for you.
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 2 of 6
(7,072 Views)
Just had a few thoughts:
 
What camera(s) are you using? 
Do they support Format 7?
Can you configure the cameras to use Format 7 in MAX (Measurement and Automation eXplorer)
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 3 of 6
(7,067 Views)
Ok I have update the project and its not crashing anymore. But sometimes when I try to change the mode to Format 7 it doesn't set the ROI. I don't understand that.
I populated the Format combo by reading in the modes from the camera first so I think it supports format 7
I am sending my updated project, please have a look at it and give you opinion
Thanks
Farhat
0 Kudos
Message 4 of 6
(7,058 Views)
Hi,
  I'm definitely getting a crash here. - Are you sure you uploaded the correct version of your code since you say yours used to crash and now it doesn't?
I've chopped out all the grabbing stuff and left it with just the snap.
If I hit snap after the load, everything's fine - I can do that as often as I like.
If I change the mode, the first snap is fine, but then a subsequent snap causes a crash.
I'm still investigating so please bear with me.
 
Thanks
 
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 5 of 6
(7,032 Views)

Hi Farhat,

  ok - I've sorted what was going on now with the crashing.

you need to set the format, the mode and the framerate when you change the setup each time.

I've put the ROI stuff back in - you might want to parse the setup to make sure that when you set the ROI it's not larger than you would normally expect (so a 320x200  max if that's the format you've chosen.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 6 of 6
(7,028 Views)