Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

grab record avi does not work together

Hi,

You can find below my VIs ( I use a usb camera to measure the light then I record the video) .They work fine when run independantly but I get error message about timeout expired if I run them fromthe main VI "Untitled 3".

Can anyone help me to sort this problem out.

Thanks a lot

Zied

0 Kudos
Message 1 of 7
(5,578 Views)

Hi again,

Please can someone help me. the error I get is :

 

Possible reason(s):

NI-IMAQdx: (Hex 0xBFF6901B) Timeout

0 Kudos
Message 2 of 7
(5,568 Views)

Hi ziedhosni,

 

It's tough to tell.  I'm looking at your code but feel a little confused - could you add some comments to make it easier to understand?  I'm guessing that the issue has to do with both VI's accessing a singular resource, but I'm not sure.

 

Have you tried using the Highlight Execution tool and seeing where it gets hung up?  If it's timing out, presumably it will get stuck somewhere in your code.  Using Highlight Execution will show you where that is, and should give some good clues.

Julian R.
Applications Engineer
National Instruments
Message 3 of 7
(5,558 Views)

Thanks spicy mystery.

Indeed I tried to follow your recommendation and I think it is a problem of memory because each part works fine individually but when together the problems arise.

I put attached another VI with comment. This vi works fine but the the second vision aquisision use the same video mode as the first vision auision, so the recorded vido of 15 seconds take more than 1.6Gb. I tried to modify the video mode from 1900*1200 to 340*240 but no success, the video recored follow the parameter of the first vision aquision which is in the subvi.

When I desactive the first subvi and I run the main VI, the video is recorded well with 64Mb with the desired video mode.

So how can I "flash" the memory to make the second vision aquisition totally independant from the first.

NB: each vision vision aquisition is in a separated frame and they are NOT run in parallel.

 

Best,

Zied

0 Kudos
Message 4 of 7
(5,548 Views)

Hi Ziedhosni,

 

Thanks for your code, I'm going over it and trying to understand it better.  You said you tried the Highlight Execution tool - I would recommend doing this while running both VI's at once, and seeing where the hangup occurs.  Did you observe where this happens?  It would help me as I could concentrate my analysis wherever you observed this behavior.

Julian R.
Applications Engineer
National Instruments
Message 5 of 7
(5,526 Views)

Hi Spicy,

Ya, I trie what you said and the vi works fine but the video recorded is too big following the parameters of the 1st vision aquisition instead of the second one.

Cheers,

Zied

0 Kudos
Message 6 of 7
(5,523 Views)

Hi ziedhosni,

 

So I've looked more at your code, and I want to try a couple things.  The first is in the colour.vi: in the IMAQ Dispose.vi at the end of it, add a true constant to the All Images input - this will dispose all the images which may help with the memory issue.  The other is to add a small wait in to the first sequence structure, where you take your first image.  It might not be closing out the reference to quick enough before moving on to the grab.

 

Let me know if either of these is helpful, and if you make any further progress.

Julian R.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(5,517 Views)