Jump to content

Address of an application instance


Recommended Posts

Hi,

Assuming I've a network of multiple computers, say A, B and C. On one computer A I've a LabVIEW application App_A running. In that application I've a valid reference to a remote LabVIEW application App_B running on a second computer B. Is it possible to find out the ip address and the port number of that application App_B from the valid reference in App_A. I need to be able to open a reference to the same application App_B on B from computer C. I need to somehow pass App_C on computer C sufficient information to connect to App_B on computer B and the only thing I've is the reference to App_B valid in App_A only.

Tomi

Link to comment

QUOTE(Tomi Maila @ Jan 16 2008, 02:30 PM)

the only thing I've is the reference to App_B valid in App_A only.

I assume that this means that you do not have access to the original settings used to open the application reference?

There is a Server.Port property, but it says it doesn't work in remote apps, so I think unless you have the original data, which you can then send through TCP or UDP, you're basically stuck.

An alternative might be for B to publish its details through UDP, but A would still need to confirm that it connected to that specific instance.

Link to comment

I'm assuming you're using the open application reference, though I've noticed that you could be using the TCP communication or similar as well.

Looking at the Open Application Reference, you have to know the machine name and can optionally add the port number when making the connection from A to B, so I assume you know both of those at A. You'd still need to get that information to C, though if you all ready know this information at A to where you can make the connection in the first place, then why don't you know it at C?

What version of LabVIEW are you using? You may be able to use shared variables to have B publish the needed information to where A and C can access it.

Tim

QUOTE(Tomi Maila @ Jan 16 2008, 07:30 AM)

Hi,

Assuming I've a network of multiple computers, say A, B and C. On one computer A I've a LabVIEW application App_A running. In that application I've a valid reference to a remote LabVIEW application App_B running on a second computer B. Is it possible to find out the ip address and the port number of that application App_B from the valid reference in App_A. I need to be able to open a reference to the same application App_B on B from computer C. I need to somehow pass App_C on computer C sufficient information to connect to App_B on computer B and the only thing I've is the reference to App_B valid in App_A only.

Tomi

Link to comment

QUOTE(Tim_S @ Jan 16 2008, 08:18 PM)

I'm using a reference that is opened with open application reference. However it's opened outside the scope of my code.

QUOTE(Tim_S @ Jan 16 2008, 08:18 PM)

Looking at the Open Application Reference, you have to know the machine name and can optionally add the port number when making the connection from A to B, so I assume you know both of those at A.

You assume wrong. The part of the code I'm working on only knows the application reference and doesn't know how it has been opened previously.

I'm using LabVIEW 8.5 or newer.

Link to comment

QUOTE(Tomi Maila @ Jan 16 2008, 07:48 PM)

I'm using a reference that is opened with open application reference. However it's opened outside the scope of my code.

You assume wrong. The part of the code I'm working on only knows the application reference and doesn't know how it has been opened previously.

I'm using LabVIEW 8.5 or newer.

Well first you should make sure it is possible to open an app reference from two computers to the same app (port) on a third computer, I doubt it.

The A-app can read the from the B.app.instance the port it is listening to, and by loading a VI into B memory that reas the current IP address (ipconfig?) it should be able to sent those info to C.

Most likely you have to take your resort to an UDP listener in B that listens to broadcasts from A or C (I know this does not fit your current requirements).

Ton

Link to comment

QUOTE(Tomi Maila @ Jan 16 2008, 12:30 PM)

Assuming I've a network of multiple computers, say A, B and C. On one computer A I've a LabVIEW application App_A running. In that application I've a valid reference to a remote LabVIEW application App_B running on a second computer B. Is it possible to find out the ip address and the port number of that application App_B from the valid reference in App_A. I need to be able to open a reference to the same application App_B on B from computer C. I need to somehow pass App_C on computer C sufficient information to connect to App_B on computer B and the only thing I've is the reference to App_B valid in App_A only.

My first thought was to run a vi in App_B from A that opens an application reference to itself and uses that to inspect the 'local only' properties and then report them via its front panel - I assume that if the App_B vi is running on B, then when it opens an application reference it gets a local application reference. That has the advantage that it is then OS independent. Of course, you have to arrange for the relevant vi to be loaded into App_B's memory otherwise you'll have to find a suitable path, but I guess a static reference in App_B would do the trick until the compiler learns to optimize non used static references out...

There is a way of looking at Remote Panel connections (both client and server) from the local app reference, but I think the remote panels were working over the web-server which is not what you want...

Link to comment

QUOTE(tcplomp @ Jan 16 2008, 08:53 PM)

Well first you should make sure it is possible to open an app reference from two computers to the same app (port) on a third computer, I doubt it.

This works fine. I built one server application and two client applications and both client applications were able to connect to the same server application simultaneously. The server port was constant and explicitly specified when establishing a connection to the server from the client.

Link to comment

QUOTE(Tomi Maila @ Jan 16 2008, 01:48 PM)

I'm using a reference that is opened with open application reference. However it's opened outside the scope of my code.

You assume wrong. The part of the code I'm working on only knows the application reference and doesn't know how it has been opened previously.

I'm using LabVIEW 8.5 or newer.

From a bit of poking about, it appears that all of the information you're looking for is blocked from any remote access. I think the sugestions of the local application publishing the information in some manner (TCP, UDP, front panel, shared variable, etc.) to be your best solution.

Link to comment

QUOTE(tcplomp @ Jan 16 2008, 01:53 PM)

Well first you should make sure it is possible to open an app reference from two computers to the same app (port) on a third computer, I doubt it.

This is no problem for the VI server. It can handle multiple client connections in parallel.There are some application properties (private I think) where you can monitor the connections and I think limit or even drop some of them yourself, but normally it can handle multiple connections.

As to the original request, I'm afraid there is no way you can retrieve the remote address and remote port from an existing Application Reference.

Injecting a VI into the remote side that you can then execute to retrieve the remote sides local parameters would be the only idea that I have. However I don't think any of the VI server stuff allowing to execute VI code that exists as a memory stream will be accessible remotely because of security concerns. So you would have to get that VI on to that computer in some way that requires physical access to it.

Rolf Kalbermatter

Link to comment
  • 3 years later...

Hi,

Assuming I've a network of multiple computers, say A, B and C. On one computer A I've a LabVIEW application App_A running. In that application I've a valid reference to a remote LabVIEW application App_B running on a second computer B. Is it possible to find out the ip address and the port number of that application App_B from the valid reference in App_A. I need to be able to open a reference to the same application App_B on B from computer C. I need to somehow pass App_C on computer C sufficient information to connect to App_B on computer B and the only thing I've is the reference to App_B valid in App_A only.

Tomi

Tomi,

I am trying to do something similar. Did you ever find out if there was a way to get the IP Address from the "application reference"?

Thanks,

Fab

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.