LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO: Best way to start/run a VI running on the RT.vi from a the host.vi

Solved!
Go to solution

Hi all,

   I have recently (3 weeks) ago started using using Labview/cRIO. I believe I have the concept of the cRIO down, but I am struggling on what seems like a simple communcation within Labview. Here is my problem:

 

I have a cRIO 9074 with x1 NI 9234 (4ch analog input) and x3 NI 9512 (motor controller) modules. I am running in hybrid mode. My RT.vi controls all motor movement (scan mode) and also the start/read of the FPGA FIFO. My Host.vi is basically a user interface and does some post processing on the data i acquire through my NI 9234. My question resides with how to start the RT.vi from the Host.vi. Do I just use the "open VI reference.vi?" I have tried that but I don't think i am doing it correctly, because what parameters do I enter for it? Do I set it up with the IP of the RT? Also, for the file path, where are the VIs saved on the RT? 

 

Thanks!

Troy

 

Note: The final product will need to be converted to a .exe. So the method of implementation needs to open/run the RT.vi automatically.

0 Kudos
Message 1 of 5
(3,726 Views)
Solution
Accepted by topic author tmbouman

Normally you would compile the RT application, deploy it, and set it as the startup application.  That way it will be saved on the cRIO's internal flash drive and will load automatically when you boot the cRIO.  Is this an option for you?

0 Kudos
Message 2 of 5
(3,721 Views)

 Should work just fine. I just didn't know it to be an option (still learning). Thanks for the post.

 

-Troy

0 Kudos
Message 3 of 5
(3,703 Views)

Hello nathand When you say compile the RT application and deploy it then set is as the startup application could you give some quick guidelines on how to do this. 

 

I can compile and apparently 'deploy' (right click in project - Deploy) the code as a VI but I cant find an option anywhere to set the VI to run on the RT on startup directly from the RT device.

0 Kudos
Message 4 of 5
(3,191 Views)

britstanger wrote:

I can compile and apparently 'deploy' (right click in project - Deploy) the code as a VI but I cant find an option anywhere to set the VI to run on the RT on startup directly from the RT device.


You need to create a build specification for an RT application (under build specifications for your RT target, within the project window). Then you build the application and set it to run as startup.

 

Alternatively, it is possible to set a VI to run at startup without building it into an application, although this is not done frequently: http://digital.ni.com/public.nsf/allkb/CD3C7A3F58CBBAAA862570F8007D8D06

0 Kudos
Message 5 of 5
(3,185 Views)