From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring images as listener from GigE Vision camera using IMAQdx C interface

Some time ago I created a GStreamer plugin for IMAQ and IMAQdx (code on GitHub). I'm now trying to add support as a listener to the IMAQdx plugin for GigE Vision cameras, but have been having some trouble. The first step seems to be opening the camera using IMAQdxCameraControlModeListener, which is a term that doesn't turn up any results on NI.com or Google, except for the IMAQdx header file, so it seems no one has publicly asked about this before or shared any example code.

 

I first call IMAQdxOpenCamera with IMAQdxCameraControlModeListener as the second argument, then I tried calling IMAQdxConfigureAcquisition, which failed with the error -50805 "Failed to create ring buffer. When I change the argument to IMAQdxCameraControlModeListener, it works fine.

 

What am I missing? Can someone provide a short example on how to do this using the C API? Thank you.

0 Kudos
Message 1 of 4
(3,181 Views)

I don't have a C example, but there is an example that ships with LabVIEW that shows how to configure a Listener:

 

C:\Program Files (x86)\National Instruments\LabVIEW<version>\examples\Vision Acquisition\NI-IMAQdx\High Level\Grab and Broadcast (Listener).vi

 

 

You should be able to look at the API calls happening in the VI and make the same ones in C. If you're still having trouble, post your code here.

 

- Katie

0 Kudos
Message 2 of 4
(3,163 Views)

Unfortunately I don't have LabVIEW installed, so I can't see that example. Is there any way to easily generate a textual description of that VI you could share with me? I'm guessing not, if no one else offers info I could try getting a trial installation of LabVIEW, though it is a massive download if I recall.

0 Kudos
Message 3 of 4
(3,157 Views)

In order to use a camera as a listener, there has to be a controller running at the same time.  Also, the camera must be sending to a multicast or broadcast IP address. 

 

1. Make sure the attribute AcquisitionAttributes:: AdvancedEthernet:: Controller:: DestinationMode is set to Multicast or Broadcast.  You can do this by opening the camera in MAX or by setting the attribute directly in C code. 

2. Open an IMAQdx session as controller.  Configure and start the acquisition.

3. Open an IMAQdx session as listener.  Configure and start acquisition. 

Message 4 of 4
(3,137 Views)