LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get RT IP Address Programmatically from Host?

We have a laptop PC that plugs into a RT PXI to collect data and configure the software on it. How can we "dynamically" discover the IP of the RT so that the laptop can download (FTP) new configuration files to it without user intervention?

I have discovered a seemingly "unsupported" ActiveX control called "NIMax Viewer" that lets you get miscellaneous information about all the things Max can see, including the RT systems. This control reduces the problem down to a few clicks from the user but its not the transparent solution we want. Unfortuneately, this control doesn't seem to allow programmactic navigation (the user still has to click on it to get it to change its selection).

If anyone has a general soluti
on to this problem, or more information about the NIMax Viewer ActiveX control, I appreciate hearing about it. Thanks.
0 Kudos
Message 1 of 5
(5,265 Views)
Hello,

There is an example of the Developer Zone that shows you how to do this. You can find it here.

You will need to provide the controller's serial number; the example will return the controller's current IP address.

Another thing you might consider is using a static IP address. While DHCP is convenient, if you need to know your target's IP address, it might make more sense to have a permanent static address assigned.

Thanks,
Dafna
0 Kudos
Message 2 of 5
(5,265 Views)
No offense, but this answer does not solve the problem, nor do anything to advance it to a solution. I haven't looked at the example yet, but you have merely exchanged the unknown. So we either use Max to get the serial number, or we use Max to get the IP address. What is the difference?

Now that I have looked at the example. How about instead of providing it as an .exe, you provide it as a .vi? Its rather useless to developers in its current state as it does not show "how to do this" it only shows that it can be done.

Thanks.
0 Kudos
Message 3 of 5
(5,265 Views)
Hi VI Guy,

In order to access your RT target you normally need to know its IP address. The example I linked earlier will help in situations where you need to connect to a specific RT target but for some reason do not know its IP address. This can happen if you configure your target to obtain an address from a DHCP server - which means that every time the controller boots it could potentially have a different address. When this happens, you could use this example to reestablish a communication with the RT engine.

The reason the serial number is required is that we need to know which of all the RT targets found on your network is the one you are interested in. So yes, in order to connect to an RT target you do need to know either the static IP addr
ess, or its serial number. You could figure out this serial number either from MAX or by looking at the sticker on the hardware.

The example is provided as an exe because it is meant as a programmatic connection tool, specifically in a situation like the one described above (where a connection is lost). At this time we can't provide the source code that provides this functionality (so I guess calling it an example is a bit of a misnomer.)

From your original post, I thought you were looking for a tool you could embed in your application that would find your controller. If this is not the case, please let me know. With your feedback, we can look at improving this utility or provide more effective ones.

Regards,
Dafna
0 Kudos
Message 4 of 5
(5,265 Views)
Yes. A tool that could be used to programmatically return the information contained in the output array of the "example" program would be just perfect. The data would need to be in a form that can be manipulated by LabVIEW, so something like a VI, a dll, or command line .exe is needed. If you took the top level VI used to make that program, with the block diagram removed, and provided it for download, I think that would be a suitable solution.
0 Kudos
Message 5 of 5
(5,265 Views)