LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MAC adress on cRIO controller?

Hi,

How to obtain the MAC adress of the cRIO controller in Labview while running on real-time target?

Best regards,
Per
0 Kudos
Message 1 of 4
(3,341 Views)
Inside the RT>>Utilities palette is a VI called Ping Controllers which returns the MAC addresses of all the RT targets on the subnet. I don't remember if it returns the MAC address of the caller, though.
If this doesn't work, or to conserve network resources, you could find out the MAC address in advance and save it in a configuration file. Since the address doesn't change, this shouldn't give you any problems after the initial setup.

___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(3,337 Views)
The function Ping Controllers worked fine, it also returned the MAC adress of the caller, thank you!

But does somebody know if there's a way to obtain the MAC adress of the controller only?

Per
0 Kudos
Message 3 of 4
(3,335 Views)
Hi Monza,

If you are not worried about the performance of the Ping Controllers call, you can do the following to figure out wich of those MAC Addresses the "RT Ping Controllers" VI returns is for your controller. See attachments for more information (includes a not-very well tested example VI).

1. Run the "RT Ping Controllers" VI
2. Figure out the RT Controllers IP address by using the "String to IP" and the "IP to String" nodes (Data Communications>>Protocols>>TCP)
3. Search in the data that the "RT Ping Controllers" VI returned for the local IP and then you will know what's the controllers' MAC address.
4. Be aware that the MAC addresses returned by the "RT Ping Controllers" VI are strings returned in HEX format (right-click String indicator>>Hex Display); so if you will be comparing it to something else make sure you have those MAC addresses to compare represented in Hex format to.

If you are worried about the performance of the "RT Ping Controllers" call and can't live with it, then let's hope that someone else comes up with a better idea.

Hope this helps.

JMota
Download All
0 Kudos
Message 4 of 4
(3,317 Views)