NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
miguelc
Posts: 134
0 Kudos

Re: Labview find ethernet device address for TCP/IP VISA communication

Thanks for the replies.

To Raven Fan, the device (its VXI-11 compliant) I'm connected to does have an IP, one that I've specified for it (its static). 192.168.0.3, and my computer Local Area TCP/IP settings: IP 192.168.0.2 Gtwy 192.168.1.1 SUb: 255.255.255.0. I also have MAX configured so I can communicate with the device through VISA resource through the crossover cable.

Gabs, I don't think the device or my computer has an XPort.

I think the 0.0.0.0 being returned is just a result of the UDP Listen that ends the while loop. Still, I can't get my device to respond. Probably because I'm not exactly sure which port to broadcast to. Any ideas on how to determine the port number? I sniffed MAX's autodetect VISA devices procedure, and it seems like it first broadcasts to the sunrpc port (111), but when I put that in, I still get no results.

Michael

Knight of NI
RavensFan
Posts: 15,732
0 Kudos

Re: Labview find ethernet device address for TCP/IP VISA communication

I find that the IP addressing, subnets and masking confuses me whenever I try to look into the details of it.  So what I am about to say may be totally offbase, but you said
 


miguelc wrote:

(its static). 192.168.0.3, and my computer Local Area TCP/IP settings: IP 192.168.0.2 Gtwy 192.168.1.1 SUb: 255.255.255.0. I also have MAX configured so I can communicate with the device through VISA resource through the crossover cable.



I am wondering abou that 3rd byte of the address.  For the device and your PC you have it set as 0, the gateway is set for 1.  Now the subnet has it set for 255 which is where I'm fuzzy on the details of masking.  Perhaps it needs to be 0.  Or the device, PC, and Gateway settings all need to be the same at 0 or 1.
 
For example on my work PC, my PC is x.x.160.80.  My gateway is x.x.160.1.  My subnet mask is 255.255.255.0 (like yours) and a realtime target (cFP) I connect to is x.x.160.102
 
Just a thought.
Member
miguelc
Posts: 134
0 Kudos

Re: Labview find ethernet device address for TCP/IP VISA communication

Thanks for your help RavensFan. There may be some settings I can optimize with the TCPIP settings, but since it can communicate when setup with MAX, I went with the "if it ain't broke don't fix it" slogan. I eventaully did figure it out, I found my device manufacturer had a IP detection in their software, which I used WireShark to look at and discover which ports and what data to send. Works fine now. It was returning the info (or acknoledgment) on a different port. Tricky stuff. Thanks.

Michael

Member
FallGuy
Posts: 3
0 Kudos

Re: Labview find ethernet device address for TCP/IP VISA communication

I put the 3rd & 4th Octal into for loops to construct a tcpip string.  Then call Visa Open with a timeout of 2ms. If no error then IP was found and I stored into array. 

 

This will find VXI-11 & LXI device on the network.  The issue for me was finding IP addresses of hardware at 169.254.x.y, since the vendor hooked up the HW for testing it would remember their address which I needed to bring up the HW page to change the IP address to my network.

Active Participant
Balaji_DP
Posts: 275
0 Kudos

Re: Labview find ethernet device address for TCP/IP VISA communication

can you tell me how to find a network adapter name?

 

if i have connected 3 network port i must have local area connection1, local area connection 2, local area connection 3, and wireless network connection

Regards,
Balaji DP
Member
Balze
Posts: 129
0 Kudos

Re: Labview find ethernet device address for TCP/IP VISA communication

Please have a look at the parse_IP.vi I posted several posts before.

 

The names are listed in the "standard output" control.

 

You only need to parse this string for the names.

(Take care of your operating system! The string depends on the Windows Version (XP/Vista/7) and the used language!)

 

Best regards,

 

Balze