From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading and Running a VI on a cRIO from a PC

Good day,

 

I am working on a project with the following architecture:

 

Windows PC/LabVIEW 8.5.1

  • runs a graphical user interface

 

Compact RIO cRIO 9014/LabVIEW RT 8.5.1

  • runs a time critical RT-host program that feeds data to the FPGA

 

FPGA

  • runs a time critical engine that outputs the data received from the RT host at a specific rate

 

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 1445:Open 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. 

 

Michel

0 Kudos
Message 1 of 11
(9,610 Views)

Hi Michel,

 

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?

http://digital.ni.com/public.nsf/allkb/F64D92E0BCA34162862573BD0072F807?OpenDocument

 

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 

 

Kind Regards

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 11
(9,601 Views)

Hillman 

 

I have looked at the following link: 

 

>How Do I Start my Real-Time Application without setting it as a Startup Executable?

>http://digital.ni.com/public.nsf/allkb/F64D92E0BCA34162862573BD0072F807?OpenDocument

 

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?

 

Michel

 

 

0 Kudos
Message 3 of 11
(9,564 Views)

Hi Michel,

 

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,

Kind Regards, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 4 of 11
(9,547 Views)

Hi Hillman,

 

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 ! Smiley Wink 

 

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 ?

 

Michel L.

 

0 Kudos
Message 5 of 11
(9,533 Views)

Hi Michel,

 

Thanks for the reply.

 

What are you VI Server Options in LabVIEW?

 

I would recommend looking at these steps,

 

How Do I Configure and Use the VI Server?

 

Do you get an error message? Or does the VI just not start?

 

Kind Regards, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 6 of 11
(9,530 Views)

Hillman,

 

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.

 

Michel

0 Kudos
Message 7 of 11
(9,521 Views)

Hi Michel,

 

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?

 

Kind Regards,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 8 of 11
(9,505 Views)

Hi Michel,

 

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,

 

Kind Regards,

 

Message Edited by Hillman on 11-03-2008 03:03 PM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 9 of 11
(9,477 Views)

Hi Hillman,

 

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.

 

Michel L.

 

0 Kudos
Message 10 of 11
(9,453 Views)