Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

multi-channel imaging using NI frame grabber

Solved!
Go to solution

We have a IMAQ 1408 being controlled by LabVIEW 8.0.

 

We wanna setup multi-channel imaging. All the channels work individually. However, when I was trying to show two channels simultaneously, only one channel works, and I got the following error message:

 

Error -1074397150 occurred at IMAQ Grab Setup.vi

Possible reason(s):

NI-IMAQ: A timeout error occurred while waiting for the specified event. If waiting for an image, verify that all video data is acquired within the timeout period. If waiting for a signal, verify that the signal assertion occurs within the timeout period.

 

I sometimes also get another error message asking me to assign different buffer to both channels. I understand that IMAQ 1408 has only one analog to digital converter (ADC) to digitize the incoming video. It can acquire from up to four different cameras, but only from one camera at a time. 

 

I don't mind making the frame rate half. So I'm thinking of showing one channel at a time and make the two channels work alternantly. But I need to know how to confige the channels to make this happen.

0 Kudos
Message 1 of 11
(6,818 Views)

Hi carless,

 

This document lays out a few guidelines for performing multi-channel acquisition from this card :

 

Notes on Perfoming a Multi-Channel Acquisition with the IMAQ PCI-1408

http://digital.ni.com/public.nsf/allkb/7ACF4FB3596CEC8B862567D8006D86E0?OpenDocument

 

You should read through these considerations and see if they apply to your current configuration. Please let us know!

 

Best regards,

 

Andrew C.

Applications Engineer

National Instruments

http://www.ni.com/support 

0 Kudos
Message 2 of 11
(6,802 Views)

Hi Andrew,

 

Thanks for the reply! I've read the page. But it doesn't tell me how to assign the buffer.

 

Please see attached for my code.

 

Here is another error I got from channel 2:

Error -1074397158 occurred at IMAQ Grab Acquire.vi:10

Possible reason(s):

NI-IMAQ: No buffers configured for session.

 

Thanks!

Download All
0 Kudos
Message 3 of 11
(6,796 Views)
Hi carless,
-May be the problem is with On board memory available with IMAQ 1408.
-My guess is if any one of the channels, acquire/uses the memory of IMAQ 1408 the other channel gets the error. Check this http://digital.ni.com/public.nsf/allkb/DEBD7A051B083E1E86256B5D005F588C
-And for buffer management and ring acquisition (don't know exactly whether this will work for you) check this http://www.ni.com/white-paper/4001/en/
Thanks
uday
0 Kudos
Message 4 of 11
(6,788 Views)

After lots of tries, I still don't know how to do itSmiley Mad

0 Kudos
Message 5 of 11
(6,696 Views)

Do you have your cameras synchronized?  You have to use the same clock signal for all the cameras, so one camera has to generate the clock and the others have to input the clock.  If they are not synchronized, the 1408 can't switch between them fast enough to do multi-channel input.

 

Once you have them synchronized, it is fairly easy, if I remember correctly.  You just specify which channel to acquire from for each frame.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 11
(6,690 Views)

Thanks Bruce for the reply!

 

Yes, they are synchronized. Do you have a sample code of how to config channels from different frames?

 

0 Kudos
Message 7 of 11
(6,687 Views)

It has been so long since I coded multiple channels for the 1408 that I don't remember much, and I don't think I have any code examples.

 

I do remember setting up a continuous looped buffered acquisition.  Perhaps 30 frames.  For each frame, you could specify which channel to acquire during setup.  I made a loop that alternated between 0 and 1.

 

I assume you don't have any problems acquiring from just channel 0, or just channel 1?  The problem is when you alternate between them?

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 8 of 11
(6,685 Views)

I have no problem on signal channel. Just don't know how to swtich them without losing too many frames.

0 Kudos
Message 9 of 11
(6,662 Views)
Solution
Accepted by topic author carless

I attached an example that should work.  I couldn't test it since I don't have the hardware, so it might need some tweaks.  I would test it with a single channel by setting the # channels to 1.  Once that works, set the # channels to 2.  I set the display to use snapshot mode so the same image can be used for all the displays.

 

The only reason I can think of that would make multi-channel acquisition fail when single channel works is lack of synchronization between the signals.  The frame start signal has to be the same for all channels.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 10 of 11
(6,657 Views)