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: 

How do I read multicast with imaqdx

I have IMAQdx version 3.9.1, and a GigE camera that needs to output to several computers.  I need LabVIEW to read this data, but for some reason, I can't get LabVIEW or the IMAQdx (through measurement and automation explorer) to do anything with the multicast.  I have tried the following configurations:

Another progarm acts as the controller, commanding multicast.  When I do this, the camera ouputs a multicast stream (observable on wireshark), but it can't be read by IMAQdx.  It can be read by the other software (Pleora's GEV player and JAI's SDK control tool).  I've tried selecting it in measurement and automation explorer, where it appears to want to be the controller, and in labVIEW set to "listener"

Running with LabVIEW as the controller.  In this case, the camera unicasts to my computer... no other program can read it

Running with measurement and automation explorer as the controller.  In this case, again, the camera unicasts to the 1 computer (observable on wireshark)... no one else can read the data.  This happens even when I explicitly set it to multicast mode per the directions at:

http://digital.ni.com/public.nsf/allkb/34DE7F5BAF86E6E9862575F40061E411

 

What am I doing wrong?  How do I get LabVIEW to read a multicast data stream from the camera?

0 Kudos
Message 1 of 10
(4,475 Views)

Hi,

 

I'm sorry for the troubles you are experiencing. I think there might be a few explanations for what you are seeing:

 

- MAX does not currently let you connect as a listener, only a controller. This can only be done via the API

- Running as a multicast listener should work properly in the situation you described. On that exact same system, have you ensured that you can acquire sucessfully in regular unicast mode? One possibility is that the Windows Firewall might be enabled. Depending on how the other software acquires, they may sit under the firewall and so could be unaffected by it.

- Unfortunately you are seeing the result of a bug introduced in IMAQdx 3.9.1 where the address register is not written properly with the multicast address. This results in the camera still unicasting the image stream so that only the controller sees it. This should be fixed in the next release. However, in the meantime there is a relatively simply workaround you can put in your code. I have attached a VI with this workaround.

 

Please let me know if you still encounter issues.

 

Thanks,
Eric 

0 Kudos
Message 2 of 10
(4,473 Views)

thanks for the reply... I though I had firewall off, but I'll check today when I get in.  LabVIEW does work fine displaying the image when it is the controller, though everything comes through unicast.

I tried to open the vi you sent, but it says it is a labview 11 vi.  I should have mentioned this before, I'm using labview 10.  Could you post a picture of the block diagram?

0 Kudos
Message 3 of 10
(4,464 Views)

Here's the snippet. The workaround goes between the Configure and Start Acquisition VIs.

multicast_workaround.png
Eric

 

0 Kudos
Message 4 of 10
(4,459 Views)

Hi!


I have a similar problem but I'm using LV 2009 SP1.


I have a DLL that opens my IP based camera. I need this DLL to send special commands which are not supported via the GigE protocol. Commands sending is only possible when I configure the DLL as "master" (= controller mode).

In parallel I need to grab images. I'd like to do this via IMAQdx. Opening the IMAQdx session in controller mode leads to "camera already in use", opening in listener mode leads to "not possible as listener" when I want to start the image acquisition.

The idea was now to start the grabbing within the DLL in multicast mode and configure LabView to receive the images as listener. But this fails, too because I'm not able to set the multi-cast attributes after I opened the session as listener.

Do you have an idea what I can try? Will it help to update to the latest IMAQdx driver? Is the bug you talked before already fixed?

 

thanks in advance.


Andreas

0 Kudos
Message 5 of 10
(4,395 Views)

Hi Andreas,

 

The bug was specifically on the controller side of a multicast setup where the camera was not being configured properly to send images to the multicast address. It did not affect the listener mode itself (although if IMAQdx was also the controller. the listener would not see any images). Thus I don't think it would be affecting you.

 

When you use your DLL as the "master", do you have any option to configure the camera for multicast mode? If IMAQdx is giving the error "The camera is not configured properly to support a listener." it means your other DLL is not configuring the camera to send to the multicast address. The listener is unable to write any registers in this mode and so it cannot adjust the parameters (this is why you cannot set that attribute directly as a listener in IMAQdx). It has to be configured by the controller.

 

Eric

 

 

0 Kudos
Message 6 of 10
(4,390 Views)

It's working fine now - but I don't know what was wrong yesterday. Maybe it was the restart of the computer over night 😉

0 Kudos
Message 7 of 10
(4,374 Views)

Hi,

 

I am also trying to use multicast with my Point Grey Zebra2 camera. I can run the camera fine with unicast, and I set my MAX to multicast under the Camera Attributes tab and was able to grab the video from with in MAX. I was not able to access the camera from another computer in MAX (got "device is in use") while grabing video on another at the same time. So I am not working with your VI to fix this.

 

I was able to run as a listener, but I get the error from the write property node for multicast "Unable to set attributes". I know my camera can multicast, but am I "unable to set attributes" because this can only be configured through point grey? How can I set the camera to multicast through LabVIEW... 

 

Thank you!

0 Kudos
Message 8 of 10
(3,953 Views)

Actually I just disabled the Set property node that was set to write multicast to the camera and it works now! I am only using the listener constant to set Open Camera, I also have the Write register function disabled with the Destination multicast address.

 

However now I recieve a timeout error. The image comes through for about 30 seconds and then "NI-IMAQdx: (Hex 0xBFF6901B) Timeout." 

 

I am using the Netgear GS108 Gigabit switch. I saw on another forum they updated the firmware on their switcher to stop the timeout error, my Netgear hardware is not configurable. Do you think the timeout error could be from LabVIEW?

0 Kudos
Message 9 of 10
(3,952 Views)
I don't think the GS108 uses IGMP snooping, so I suspect multicast traffic simply is broadcast to all ports. I would guess maybe it is a firewall issue.
0 Kudos
Message 10 of 10
(3,949 Views)