LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time target IP address

We have identical RT systems running off identical CD's. They all work because all the RT targets are standalone systems and have the same static IP address. We are moving these units to the network so this will no longer work. I need a way for LV to get the DHCP or Link Local IP address, connect with the target then run the program from the CD. I tried changing the target IP address in my project to the target host name but that didn't work.

PaulG.
Retired
0 Kudos
Message 1 of 8
(5,723 Views)

Which version of LabVIEW? LabVIEW 2012 has the Find VI found under the Real Time -> RT Utilities -> System Configuration palette which will search for all RT systems on the local network and return information about them. LabVIEW 2009 has a similar VI called Get Target Information. You should have one or the other, although I'm not sure when the change was made.

Does this solve your problem of finding the IP addresses for the RT systems on your network?

0 Kudos
Message 2 of 8
(5,711 Views)

I'm pretty sure I can find a vi that will help me get the IP address of the target, but taking that IP and deploying to it in the actual code is where I'm a little lost. From what I can tell the .exe gets the IP address from the RT target in the project. I don't see anything in the code that links the code to an actual IP address. I thought all of that was done "under the hood". 

PaulG.
Retired
0 Kudos
Message 3 of 8
(5,701 Views)

In that case I'm confused about what you're trying to do. You have an application on a CD that somehow needs to be run by an RT target, or you have an application on a CD that simply talks to the RT target? I can't think of a situation where LabVIEW automatically embeds the IP address of an RT system into a compiled executable. Are you running a compiled application, or within the development environment?

0 Kudos
Message 4 of 8
(5,697 Views)

@PaulG. wrote:

We have identical RT systems running off identical CD's. They all work because all the RT targets are standalone systems and have the same static IP address. We are moving these units to the network so this will no longer work. I need a way for LV to get the DHCP or Link Local IP address, connect with the target then run the program from the CD. I tried changing the target IP address in my project to the target host name but that didn't work.


I agree with nathand, you've not provided sufficient information here to help you out.  

 

Let's break down what you've provided thus far:

 

1.  You have identical RT systems running off identical CD's.

 

What do you mean by this?  Do you have an "RT System on a Disk" such that the system boots from the CD and runs RT?  I'm pretty sure this doesn't work, so that's probably not what you mean.  However, if the CD's drive letter stays constant, I assume you could run a startup app from the CD once LabVIEW Real-Time has started - this seems more logical.

 

Is this what you've done?  Because as I tried to state a #2, I fell into a, "No, I really don't have enough information to give a #2 here."  

 

Can you better explain your architecture for how the RT system interacts with the application on the CD?  How does RT load the app on the CD even in the single-system use-case?

 

-Danny

0 Kudos
Message 5 of 8
(5,674 Views)

The CD is a complete, released and controlled LabVIEW application. It has the exe, ini, data etc. It has a copy of the startup.rtexe, although once this is loaded it just sits in the RT system and runs. It has other info (Excel templates, ini files, etc) in supdirectories. These CD's are identical and must be able to run on 4, 5, 6 or more other identical systems

 

My problem: the RT target in my development machine that creates this application has a specific IP address. I have to manually go into each and every other duplicate machine and change the IP address to the same IP or else the Host and RT targets will not communicate.

 

I need something more dynamic, not just for this application but for another I am writing now.

 

I need the released application software, when the exe is launched, to go out to the RT system, get it's IP address and use that IP to communicate between the host and RT target - regardless of what system it is installed in and regardless of the IP address of the target.

PaulG.
Retired
0 Kudos
Message 6 of 8
(5,641 Views)

I don't think you mentioned what version of LabVIEW Real-Time you're using - it makes a huge difference.  After LabVIEW Real-Time 8.6, we implemented AutoIP so that the target will get a DHCP address "by default" (and if DHCP is not present, it will collaborate for a Link Local IP address) - this way you will have unique IP addresses across the network.  The only problem is that if you have multiple systems on the network you still need to be able to communicate with them uniquely - you can query the network and get back all RT systems, but you've still got to be able to marshall what application talks to what RT system.  That's a challenge you've got to work out yourself.

 

-Danny

0 Kudos
Message 7 of 8
(5,626 Views)

PaulG. wrote:

My problem: the RT target in my development machine that creates this application has a specific IP address. I have to manually go into each and every other duplicate machine and change the IP address to the same IP or else the Host and RT targets will not communicate.


What are you using for the communication mechanism between the RT and host applications? Are you using network shared variables? If not, why does it matter what the IP address is of the RT target on your development system? If you were to use TCP/IP, you could use the functions I mentioned in my earlier post to find the address of the RT target.

0 Kudos
Message 8 of 8
(5,623 Views)