Use the NI System Configuration API to access to target information such as the MAC address. See the snippet and instructions below for example code.
- Open a reference to the target.
- Find network interfaces on the target.
- Obtain properties common to all network interfaces.
- Obtain properties specific to different types of network interfaces.
- Combine properties and output to tables.
- Close the reference to the target. Use the error dialog box to display any errors.
This is used for VxWorks, PharLap and NI Linux Real-Time targets. Using the NI System Configuration API, you can also access target information like the model name and serial number, monitor critical system attributes (CPU, RAM, etc), reboot, format, etc. You can also configure and obtain network and time settings.
You can navigate to the LabVIEW Examples (Help >> Find Examples
), and search for the Network Settings Viewer.vi
or go to: C:\...\National Instruments\LabVIEW 2015\examples\nisyscfg.
This code will try to find network settings on the target you select on the front panel. If necessary, you can save and modify the code, as you need to obtain only the MAC address.