Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify a GigE camera by IP address

Solved!
Go to solution

I have a system with 8 Basler Ace GigE cameras, all on static IP addresses on the same subnet.  I would like to be able to exchange any camera with a new one which is configured for the same IP address and have my LabView RT program running on an EVS automatically start using the new camera.  The LabVIEW program already sets the necessary parameters in the camera, so I do not want the user to be required to use MAX for any camera configuration.  I just want the user to use the Basler IP configuration tool, and the Basler tool to focus the camera, then have my program discover the camera by IP address.

 

However, I have not found a IMAQdx tool that allows me to distinguish cameras by IP address.  The Discover Ethernet Cameras VI has an Address input, but it is only a mask, and does not allow me to narrowly find just a single camera on one IP address.  I have not found any camera property or attribute that returns the IP address. 

 

So, if I have a bunch of cameras and want to identify which is which by IP address, how do I do that?

Message 1 of 15
(11,720 Views)
Solution
Accepted by topic author Ken_Brey

Hi Ken,

 

The main identifier IMAQdx uses to track/locate cameras is its serial number, which for GigE Vision cameras in IMAQdx is identical to its MAC address. Unfortunately we don't really use the IP address as any sort of identifier to connect to a specific camera because we assume that the IP address may be dynamic and can change (the GigE Vision spec makes DHCP and Link-local addressing a standard requirement and everything was designed to allow those cases to work well).

 

That said, there is an attribute called "CameraInformation::IPAddress" that you could query to see the IP address of the camera. The only downside is we do not currently provide this information via the Enumerate mechanism --- you'd have to open the camera first to query this property. Maybe your application could first iterate through the cameras and make a mapping of serial numbers to IP addresses?

 

Hope this helps,

Eric

0 Kudos
Message 2 of 15
(11,710 Views)

Eric,

 

That sounds like it might work.  In Basler's IP Configurator they also allow specification of a "Device User ID", which I have found is completely independent of the camera id in MAX.  Is it possible to query this parameter to identfy which camera is which?

 

My goal is to create a camera replacement procedure that only requires installing a small and free Basler utility, and not MAX or IMAQdx.  It would also be convienent if I didn't have to enter the camera serial (MAC address) into a configuration file as well.

 

The attributes I have successfully read and written are listed in the camera's .icd file.  That file doesn't contain "CameraInformation::IPAddress".  Where can I find a list additional parmeters I can query such as this one?

0 Kudos
Message 3 of 15
(11,707 Views)
The ICD file only contains attributes that are known by IMAQdx (or described by the camera) to be "persistable" features that store a camera setting. By definition these are features that are restored by IMAQdx when it opens the camera. The IP address is something that is stored on-camera (for static IPs) or assigned dynamically by DHCP/LLA. This is why IMAQdx doesn't store it in the ICD file becase it doesn't make sense to restore it at that point. You can query the Device User ID as a normal attribute in IMAQdx - but the same limitation of having to open the camera first. However, if that ID is programmed *before* IMAQdx first sees the camera (and creates an IID file for it), IMAQdx will default the camera name used to access it to that name rather than the default (e.g. "cam0"). You could also manually clear all the IID files out and this will force IMAQdx to re-generate the names following those rules the next time the library is loaded. As for the list of attributes you can query, the best place is in MAX under the "Camera Attributes" tab. You can change the filter option to show "All attributes" rather than just camera-provided ones and you'll see all the IMAQdx ones as well. Eric
0 Kudos
Message 4 of 15
(11,705 Views)

I have exactly the same problem like Ken Brey: I need to open a camera via the LAN adapters and cameras static IP adresses.

I'm using a camera-board from Pleora. They also offer a tool to write the static IP to the camera.

 

I would be a great improvement if NI would offer an alternativ VI for openig GigE cameras which uses the IP address as input instead of the session name.

0 Kudos
Message 5 of 15
(11,617 Views)

Hi Andi,


We're looking into the possibility of supporting this for the next release.

 

However, in general we are trying to move away from the model of specifying things by IP addresses. In the network world things are going to more dynamic methods of addressing and discovery. Newer versions of the GigE Vision spec allow multiple IP addresses per camera device or multiple camera "instances" sharing the same IP address (just running on a different port). This complicates the case of using just the IP address as the key to open a specific camera.

 

Applying a static IP address to a device and opening it via that address seems like a lot more work than just letting the device use an address via DHCP/Link-local-addressing and addressing it using the persistant Device User Name. This avoids and configuration of IP address required on the device and host side.

 

Eric

0 Kudos
Message 6 of 15
(11,609 Views)

In that case, some coopoeration between camera manufacturer and NI is in order.  In my application, I wanted to use manufacturer software to configure a new camera out of the box, and not require a support person to install MAX or any other NI equipment.  The camera manufacturer supplied a camera name which would have been sufficient to uniquely identify the camera, but NI didn't support reading that name.  NI gives cameras it's own name if a replacement camera is inserted into the network with the same name as the replaced camera.  If NI would support reading out the name known by the camera instead of the name known by MAX, that would be better to me than identifying by IP address.

0 Kudos
Message 7 of 15
(11,607 Views)

@Ken Brey wrote:

In that case, some coopoeration between camera manufacturer and NI is in order.  In my application, I wanted to use manufacturer software to configure a new camera out of the box, and not require a support person to install MAX or any other NI equipment.  The camera manufacturer supplied a camera name which would have been sufficient to uniquely identify the camera, but NI didn't support reading that name.  NI gives cameras it's own name if a replacement camera is inserted into the network with the same name as the replaced camera.  If NI would support reading out the name known by the camera instead of the name known by MAX, that would be better to me than identifying by IP address.


Ah, that explains things a bit better. You are dealing with the replacement camera case. IMAQdx does have some logic to allow one to replace a specific camera with a different one and uses a heuristic to decide whether to attach to an existing IID file of a camera that is no longer attached (with specific name, camera settings file, etc) or create a new one. Right now that heuristic mainly uses camera vendor/model for this. If I understand your use case correctly, you'd like IMAQdx to consider the user-set device name programmed into the camera as an additional characteristic, right? In other words, if you removed one camera with a specific name and attached a new one with that same name, IMAQdx should have it take its place? This seems like a reasonable behavior to me and might be possible to change.

 

Eric

0 Kudos
Message 8 of 15
(11,603 Views)

Any update on this? I have the same issue... I would like have the "plug-n-play" behaivor. In my case, doesn't matter if it is the IP or the MAC Address.

 

Thanks!

0 Kudos
Message 9 of 15
(11,313 Views)

Hi,

 

With older versions of IMAQdx, you can either open directly by MAC address using a "uuid:<hex Mac addr>" syntax or set the DeviceName into non-volatile memory on the camera before using it with IMAQdx and (provided it does not conflict with existing interface names) it will be used as the main interface name instead of "camX".

 

Starting with the upcoming 4.2 version of IMAQdx you will also be able use an "ip:<ip addr>" syntax to specify a camera.

 

Eric

0 Kudos
Message 10 of 15
(11,307 Views)