NI Home > Community > NI Discussion Forums

Machine Vision

Showing results for 
Search instead for 
Do you mean 
Reply
Member
M.Younis
Posts: 5
0 Kudos

How can I know my Smart Camera IP using UDP or other way?


Hi
I am using NI smart camera 1772 and VBAI 2012. Also I am communicating with the camera from my network based application (VB6) via TCP commands.
My problem that I need to knew what the smart camera IP on the network without using VBAI2012 or NI Measurement and Automation.

I mean I want to use only my application to detect and communicate with a free run smart camera (like the NI Measurement and Automation detection). I do not want to rely on a preconfigured fix IP address.


I read an article under Knowledge Base -> http://digital.ni.com/public.nsf/allkb/ED3444B5E064DC9986256E6000814C5B about
TCP/UDP 3580 port that used as nati-svrloc (NAT-ServiceLocator). used by Measurement & Automation Explorer to locate remote targets.
How can I use this UDP port to locate my smart camera on network? I just want to know what the message that I suppose to broadcast to let the smart camera to send me back its IP.

Member
Wee-Bey
Posts: 173
0 Kudos

Re: How can I know my Smart Camera IP using UDP or other way?

You can just ping the Smart Camera using its host name. The host name can be found in MAX under Remote Systems. That host name should not change. For example, if I go into Windows command line and type in "ping MySmartCamera," I'll get ping information and an IP address just like if I type "ping www.google.com." You can build this into your VB code.

Ravi A.
National Instruments | Applications Engineer
Member
M.Younis
Posts: 5
0 Kudos

Re: How can I know my Smart Camera IP using UDP or other way?

Hi 

 

Thank you for your help, but unfortunately it is not working.

My cam name is "ninew”. I typed    :     ping ninew    and I got      “ping request could not find host ninew. Please check the name and try again.”

 

Please help me

Member
Kira_T
Posts: 186
0 Kudos

Re: How can I know my Smart Camera IP using UDP or other way?

Hi M Younis,

 

Did you use the Host Name or the DNS name? Please make sure to use the full name when running the ping command. Also, have you tried to access the IP address from the DNS host name through a Microsoft VB command, such as the one found here?  Please let me know if this helps.

 

Regards,

Kira T

Active Participant
BlueCheese
Posts: 1,185
0 Kudos

Re: How can I know my Smart Camera IP using UDP or other way?

The mechanism of trying to resolve it through your centralized DNS server will only work if the record is either added manually to your network's DNS server or is done automatically by your DHCP server when it gets an address (this is how NI's internel network is configured, which is why I think our application engineers are suggesting it because it works here).

 

There's a few various ways to discover your device...

 

- In the past, NI used an propeitrary broadcast UDP protocol to discover any real-time targets (including Smart Cameras). I don't believe the protocol is externally documented, but you could use it in LabVIEW code with some VIs on the LabVIEW palette. Some simple packet captures could probably let you reverse engineer it enough to send the packets in your own code. At some point this protocol will no longer be supported by future software/devices.

 

- Newer versions of LabVIEW RT use a different mechanism based on the standard multicast DNS mechanism. Again, the specifics of how NI makes use of it are generally not documented. The official mechanism to access this is via the System Configuration API (see https://decibel.ni.com/content/docs/DOC-13216). I know they have a VB .NET interface that you could use to discover any NI devices (note that this doesn't directly filter out targets running Vision Builder AI)

 

- If you don't want to discover devices but rather just resolve an IP address of a known device on the same network, one option might be to make use of the way multicast DNS can be used for name resolution. On a Windows machine that has the various NI software installed, the multicast DNS resolver software that is installed hooks into the name resolution services used by windows and allows you to resolve multicast DNS names without them being present on a centralized DNS server. The key is to append ".local" to the DNS name to resolve. For instance "ping NI-NI1772C-XXXXXX.local" might work.

 

Hope this helps,

 

Eric