08-07-2010 12:11 AM
I may need to choose one of the NIC. Thanks.
08-07-2010 12:32 AM
Look under the "Data Communication >> Protocols >> TCP" palette and you'll find two VI's called "IP to String" and "String to IP". The combination of these will allow you to find all IP addresses or names of the network adapters on your computer. (Note: you can right click on String to IP and select "Multiple Outputs" which displays all available network adapters).
Coincidentally, this was one of the questions in the head-to-head Coding Challenge at NIWeek this year. 😉
If you need the description, you must make DLL calls into OS libraries.
08-07-2010 04:36 AM
The number of the NIC is the MAC adress, or the Physical Address. I have a trick to do that if your problem is not solved.
08-07-2010 10:31 AM
Coq Rogue is right... I didn't answer your question at all! Unfamiliar with the term "NIC number", I assumed IP rather than MAC address. A simple Google search on my part would have saved some embarrassment!
OK, so to find a MAC address, the routines you use are dependent upon the OS of your target computer. Here are some links that give several methods for different targets:
http://decibel.ni.com/content/docs/DOC-9978
http://forums.ni.com/t5/Real-Time-Measurement-and/Get-mac-address-of-cRIO/m-p/707371
08-07-2010 02:27 PM - edited 08-07-2010 02:29 PM
Use the system exec to run an ipconfig command then parse the output.
08-12-2010 10:07 AM
Hi Coq Rouge,
May I know how you do it.
I need to get the info as below. The number 1, 2 and 3 with their description.
1. \Device\NPF_{..................} (Realtek RTL8168C/8111C PC
I-E Gigabit Ethernet NIC)
2...............
3...............
10-16-2017 01:20 AM