LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview find ethernet device address for TCP/IP VISA communication

Gabs,

when your colleague used UDP broadcast, why don't you?
Is there only one device in your subnet responding on the UDP port?

I don't know very much about UDP broadcast, but have a look at my idea. (Are UDP vis standard? or an additional toolkit? sorry, i don't know. i'm working with a developer suite, that contains (too) much stuff. 🙂

Regards,

Rainer
Message 11 of 39
(2,910 Views)
UDP functions are standard and there is also the UDP Multicast function. When you specify 255.255.255.255, that does a UDP broadcast. There are shipping examples of both.
Message 12 of 39
(2,895 Views)

Rainer,

GREAT!!!  Smiley Very Happy Thanks a lot for your VI - it works PERFECTLY! This is exactly what I was looking for.

And Dennis, thanks for letting me know that this is standard, so I can use these functions without any restrictions.

Again, thank you so much,

Gabs

0 Kudos
Message 13 of 39
(2,889 Views)
Gabs,

nice to hear it works.
Don't hesitate to rate my answer 😉

Regards,

Rainer
0 Kudos
Message 14 of 39
(2,880 Views)

Rainer,

sure Smiley Wink

Thanks, again,

Gabs

 

0 Kudos
Message 15 of 39
(2,876 Views)

Hi again,

today I have another question about UDP broadcasts. The example Rainer attached a few months ago works perfectly. What if there is more than just one network card in the computer? When working with LabVIEWs VISA functions for TCP/IP communication, I can specify the board number in the VISA resource name. For UDP functions, there is no such resource name, just the port number. How can I specify which LAN card to use for the UDP broadcast?

Thanks a lot in advance,

Gabs

0 Kudos
Message 16 of 39
(2,817 Views)
Hi Gabs,

AFAIK, a broadcast to 255.255.255.255 should go out to ALL reachable networks. IMHO it should use all accesible network cards.
If you specify a unique IP adresse for your UDP port, the UDP vis should also try to reach it via both network cards.
(In fact i'm not sure, but that's how i understand UDP.)

Try it and let me (us) know 😉

Best regards,

Rainer
0 Kudos
Message 17 of 39
(2,814 Views)
Not only broadcasting spreads over all available networks as Rainer pointed out, but it should also be taken into account that a receiver could get more than one UDP message, depending on the numer of available interfaces through which the remote sender can be linked to. For example, if you configured a single NIC to have two IP addresses, the broadcasted packet will be received twice by a "listener" program.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 18 of 39
(2,811 Views)

Hi,

well, that's what I thought, too, but the practical test showed different results than theory predicted Smiley Mad

We have tested the UDP broadcast VI on a computer which has two network cards installed. Two different devices were connected to these cards. The broadcast did only return one of the devices. The other device, connected to the second network card, was not found. Hmmm....???

Do you have any other idea, assumption, recommendation...?

Gabs

0 Kudos
Message 19 of 39
(2,807 Views)
Hi Gabs,

did you try to reach the two devices using the IP adress of the devices (one after the other)? Are you sure the networksettings are OK?

Does the software written in C++ find both devices?

Regards,

Rainer
0 Kudos
Message 20 of 39
(2,804 Views)