Jump to content

Running VI via VI Server on Remote Target


Recommended Posts

I am running into a problem running a remote VI using VI Server.  I am sure I am just doing something stupid but I can't seem to put my finger on it.

 

The system is intended to work both in Development (running in the IDE) and compiled mode (running under the RTE).

 

When I want to control the remote application from the local one, I open an application reference to the machine/port, then open a VI reference to the target VI.  The difference is, if the app.kind is Development System then I get the project list, search the project names for the one with my VI in it, then get that project's app reference.  I then open the VI ref using this app ref.  I use the VI name, not path to open the VI since is should already be in memory in the target application instance.  I am using the fully qualified name (.lvlib and .lvclass included in the name).

This works fine if both the 'local' and 'remote' projects are open on the same machine.  But if I put the remote project on a difference machine, then I get error 1004, the VI is not in memory.  I get this error even if the target VI has it's front panel open on the remote machine.  I have also tried using the main VI Server app ref instead of getting the app reference of the project from the main app reference but that gave the same result.

I can confirm that I have the correct application ref since it returns the correct lvproj name.  And if I open the VI using it's full path, that works fine.  It just appears that I cannot open a ref to the VI that should clearly be in memory.

 

So, is there some subtle difference in what is allowed with an application ref if it is on the local machine vs a remote machine?  Can I simply not get a ref to a VI in memory if the machine is remote?  I thought anything you could do between two application instances would work in all cases, regardless of if they were on the same machine or different ones.

 

thanks for any thoughts...

 

-John

Link to comment

I have never implemented this function with a remote target, so I can only reason with the little information I have:

Telling from the help, your solution should work fine. However, it says:

 

vi path accepts a string containing the name of the VI...

 

and furthermore

 

Note If you specify a remote application instance with application reference, the path is interpreted on the remote machine in the context of the remote file system...

 

It explicitly says path and not string or path, so I'm not sure if your problem is the expected behavior, or a bug (I could argument for either of them). Anyways, in my opinion the application instance perfectly identifies the target and there should be no problem with either a string or a path.

Link to comment

'All VIs in Memory' is blocked for all remote connections.

"Returns a list of VIs in memory for the specified application instance. This property returns an error if you wire a remote application reference to the reference input."

 

I did finally get this working.  The problem was a mistake in the port number due to a default value in a VI I forgot to override.  So, it turns out I was doing something stupid...

 

thanks for the replies...

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
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.