Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I perform a Remote vi call from LVRT

I would like to call a vi on my windows host computer from a cRIO vi.  I would like to understand my options here:

Can I do a remote call with the pathname and/or vi string name if it is in memory?  What is the format of the name?

Does it include the project name as well?  Thus far I have tried every permutation I can think of but cannot get

a good vi reference.  Also, is it possible to open up a remote reference to a reentrant vi that is currently in memory?

0 Kudos
Message 1 of 4
(3,742 Views)

Using the complete path on the remote Windows system works for me to call a VI from RT. See the attached screen shot. In order to actually see the VI front panel I needed to explcitly show the FP in the called VI, otherwise the VI will run with a closed FP. The top diagram is what runs on RT, the bottom VI is on Windows.

 

Can you describe your question about calling a reentrant VI in more detail? Is the VI you want to call a subVI of another (main) VI on the host? And asummedly the main VI on the host that is calling the reentrant subVI is not already running?

 

Message Edited by Christian L on 12-04-2008 11:14 AM
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 2 of 4
(3,728 Views)

In regards to the reentrant VI and calling a VI already in memory, in my previous example if you replace the path constant with a string constant, you can specify only the VI name without the path and it will call the VI in memory.

 

In addition you can call a specific clone of a reentrant VI in memory by appending a colon and the clone number to the VI name. The following strings all work for me, assuming I have another VI loaded on the host which is calling two of my reentrant VIs.

 

Host VI.vi

Host VI.vi:1

Host VI.vi:2

 

The following does not work and returns error 1004 in RT since this clone does not exist.

 

Host VI.vi:3

 

Error 1004 occurred at Open VI Reference in RT VI.vi

Possible reason(s):

LabVIEW:  The VI is not in memory.

To load a VI into memory with the Open VI Reference function, a path must be wired for the VI Path input.

VI Name: Host VI.vi:3

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 3 of 4
(3,724 Views)

Thanks for your input.  It appears that most of my problem was in not understanding that each target within a project has its own VI Server Configurations.  Also,  in my case I needed to

specify a non-default Service Name.  For some reason I could not get the default name to work with the Open Application vi.  It turns out I did not need to call my host vi reentrantly.  I only needed

to call a normal subvi placed within the originating host vi that initiates the NSVQ.Send_Command  (Network Shared Variable Queue)

0 Kudos
Message 4 of 4
(3,722 Views)