12-03-2008 09:57 AM
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?
12-04-2008 11:10 AM - edited 12-04-2008 11:14 AM
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?
12-04-2008 11:24 AM
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
12-04-2008 11:35 AM
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)