I am working on a project with the following architecture:
Windows PC/LabVIEW 8.5.1
Compact RIO cRIO 9014/LabVIEW RT 8.5.1
Right now, I have to manually start the PC application and the cRIO application manually. The FPGA is loaded programmatically by the cRIO RT-host.
I would like to have the PC application loading and starting the cRIO RT-host automatically. I do not want to build a standalone application that starts up automatically on the cRIO. I have done that successfully on previous versions of LabVIEW.
From the documentation I saw, it should be possible to open a reference to the remote application instance (on cRIO) an then open a reference to the RT-host VI on that instance then use the VI reference to load/run the VI.
The problem is that when I try to open the VI reference on the PC, LabVIEW tries to open the reference as if the VI was local to the PC instead of remote.
I get "error 1445pen VI Reference no longer matches VI in memory by filename. A filename is no longer sufficient because the full name of a VI now includes any owning library".
I would appreciate any help.
Thanks for the post!
I have never tried this before - but I found some guidence:
How Do I Start my Real-Time Application without setting it as a Startup Executable?
It answered the question, how am I suppose to start my real-time application without choosing "set as startup"?
Let me know how it goes,
I will try this tomorrow
I have looked at the following link:
>How Do I Start my Real-Time Application without setting it as a Startup Executable?
It provides good information but I was still not able to load and run a VI on the remote Target (cRIO) from the PC.
I am including a simple test project with this posting.
The test project is configured with a PC and a Target (cRIO 9014).
The Target contains one VI, RT_host.vi which increments Variable1 (network variable hosted on the cRIO) every seconds.
The PC contains one VI, PC_GUI.vi which reads Variable1 and displays the value on the PC screen 10 times a second.
The goal is to run the PC_GUI.vi from the project window and have RT_host.vi to deploy and run on the cRIO under programmatic control of the PC_GUI.vi.
I was not able to achieve this.
Have you got a chance to look at this issue?
Thanks for the reply and I hope your well today.
So, my preferred method would be to still have the start up vi on the cRIO and the use the state machine with an idle start. This is easier and makes more sense to me.
However, VI Server is a valid method also. I think your error is because the path name your using is the location on the vi on your Pc Machine. You should simply use the name of the vi i.e. "Host cRIO.vi, because the IP Address should point the reference to the cRIO.
Please take a look at the example in the example finder (Help>>Find Examples>>Search Tab>> VI Server>> VI Server.lvproj.
Let me know what you think,
Thanks for your help.
I understand that the standalone application with a VI defined as startup is the easiest to implement.
However, in our lab environment, we use the same physical cRIO to perform various independant function on various project.
Not all people are familiar with the deployment steps of the cRIO application and, I would say, some of them do not want to know about it !
I would prefer if the main VI of my project on the PC would deploy all that is necessary to the cRIO.
I tried what you have suggested for the VI server method (just passing the name of the VI instead of the full path of the VI on my local machine) but it still does not work.
I have also tried to start the VI using a static VI reference and the Run VI invoke node, with no success.
Any ideas ?
Thanks for the reply.
What are you VI Server Options in LabVIEW?
I would recommend looking at these steps,
Do you get an error message? Or does the VI just not start?
You can find all my settings on the project that was attached on a previous message.
I have checked those settings and they look fine to me.
When I use a static VI reference and the Run invoke node, RT_host.vi starts on the PC instead of the cRIO.
When I use a remote application reference to the cRIO LabVIEW instance, and then try to use the Open VI invoke node and the Run invoke node, I get a #7 error: File not found, with the path of the VI on my local PC.
Do you have access to a cRIO? If so, can you try the test project on your setup an see if you get the same results as I do?
Let me know what you think.
Thanks for the reply.
I do have access - and was trying it out yesterday, but I am out of the office this afternoon, so I will look into it on Monday.
I would suggest making sure you do have your VI Server Settings correct (i.e. can you ping it?) & secondly trying out the example in the example finder.
Let me know how you get on?
I hope your well today.
As promised I have taken a look at this today.
I managed to get it working.
1) Make sure your cRIO VI Server settings are open, i.e. Project View>> Right Click on Target >> Properties >> VI Config (as well as the Sever PC)
2) Make sure Open VI Reference has the correct specifier.
3) See code attached.
Let me know what you think,
As stated in my first post, I am running LabVIEW 8.5.1 so I will have to upgrade my installation to 8.6 in order to run your example. I will get back to you when I have a chance to do so.