Showing results for 
Search instead for 
Did you mean: 

Determining cRIO's IP Address

Determining cRIO's IP Address

I am using the cRIO-9012 controller with LabVIEW 8.20.  Normally, I use the 'String to IP' function along with the 'IP to String' to get my PC's IP address: 
This doesn't seem to work for the cRIO though -- I always get ""
Why would this not work on cRIO?  Any other way of getting its IP address? 
Thanks in advance!

Message Edited by Khalid on 12-19-2006 12:03 PM

0 Kudos
Message 1 of 8

Re: Determining cRIO's IP Address

Works ok on my cRIO-9002 with ETS.  I wonder if this has something to do with VxWorks on your 9012.

Message 2 of 8

Re: Determining cRIO's IP Address

Hi Khalid and David,

This was reported to R&D ( # 43QEFQM3 ) and is currently being investigated. Thanks for the feedback.


Steven Bassett
CompactRIO Product Support Engineer
National Instruments
Message 3 of 8

Re: Determining cRIO's IP Address

Thanks David and Steven,

It does look like an issue with the VxWorks on cRIO-9012.  While R&D looks into this, I was wondering if I can perhaps get the IP Address from the OS myself.  I am new to VxWorks and don't know how to go about making some VxWorks API calls from my RT VI.  I know VxWorks uses .OUT extensions (instead of the .DLL), but that's about it.  Contrasting this with PharLap (from cFP and older cRIO controllers), I could still call a sub-set of Win32 API calls.

I found the VxWorks' API on the Net, but didn't find anything on how to go about making the calls themselves, as in what .OUT files have which functions, etc.  I am sure NI's functions are doing some of this.  Would appreciate _any_ input on this.

Thanks much in advance!


Message 4 of 8

Re: Determining cRIO's IP Address

Hi Khalid,
Sorry for the late reply as I have been out on Holiday.  You are correct that VxWorks uses .out extensions instead of .dlls thare are used on PharLap.  However, VxWorks does not support Windows API calls.  Check out the following link on calling External Code with the 9010 series controllers to give you a start on using .out files.
As we investigate I will give you an update with our findings.

Message Edited by Bassett Hound on 12-27-2006 08:52 AM

Message 5 of 8

Re: Determining cRIO's IP Address

Hi Steve,

Thanks for the response.  I realize VxWorks doesn't support the Win32 API.  I was actually wondering about the VxWorks' API itself.  Being an OS, I am sure VxWorks exposes some system-level API for the apps running on it.  And am pretty sure LVRT is calling this API for some of its functionality (and to get the IP address??).  So I am looking for ways to call this VxWorks' system API from a real-time VI. 

Thanks again.


0 Kudos
Message 6 of 8

Re: Determining cRIO's IP Address

Hi Khalid,

Your correct that VxWorks does expose an API that can be called from Applications running ( I believe you found some info on this already ).   However,  the function calls you can make from LabVIEW would be calling the same ones used by the String to IP or any other VI making calls.  Due to this you would not be able to workaround the issue by simply calling the API as the fix will need to come at a lower level.  I believe you have been speaking with Kalin, one of our Applications Engineers.  Please contact him as he should be able to provide some more information providing a workaround for this issue.


Steve B.
Message 7 of 8

Re: Determining cRIO's IP Address

I can confirm that this works on cRio-9012 now. I'm able to get the local IP of the device.  
LV version 8.5.1.

0 Kudos
Message 8 of 8