LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clicking run VI under myComputer tries to deploy to cRio

I have a project that has a cRIO in it, and I believe I have correctly deployed a VI to it that scans a network shared variable (shared via the cRIO) and talks to the hardware depending on its contents.  I have written another vi that resides under the myComputer portion of the project that reads/writes to that same shared variable.  When I click the run icon for the vi that runs on myComputer it brings up a dialog that says "The target is already running a Real-Time Startup Application.  Press OK to confirm you want to abort the existing application and connect to the target from this project." and seems to be talking about the cRIO.  But this confuses me becuase the target for this VI should be myComputer.  I don't seem to have issues with other VIs in the myComputer portion of the project unless they talk to the shared variables.  below is what my project looks like.  SerialScan should run on the cRio, and SerialCommand.vi is the vi I am trying to run on the host.  Also is the popup that I get whenever I run SerialCommand, clicking apply seems to redownload something to the cRIO that results in SerialScan not running on it.  Am I doing something wrong?

 

project.jpgerror.jpg

0 Kudos
Message 1 of 5
(3,248 Views)

Did you open the VI from the project window, or Windows Explorer?

 

If you have a project open and have an RT controller selected (or anything under the RT controller), then a VI opened from Windows Explorer will run on whatever target you have selected by default. Same behavior if you have the FPGA or anything under the FPGA selected in the project. Opening the VI from the project window should select the correct target.

 

Either way, if you are running a VI within a project, you can look in the bottom left corner of the VI and see what target it is set to run on. You can right click on this and select another target (or My Computer).

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

What are you doing with this VI?  Are you doing anything that would make the shared variables deploy? 

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

Hi GreenRiver,

 

It is important to note that when a VI that references a network-published shared variable runs, all variables in the library containing the variable are deployed and published. It looks like your SerialScan.vi is located within that same library. Is there a reason that you can’t move that VI outside of the library and into its own folder?

 

Regards,

 

Kyle S.
Applications Engineer
National Instruments
http://www.ni.com/support

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

Hi GreenRiver,

 

Additionally, please reference the LabVIEW Help for Deploying and Running VIs on a RT Target:

 

Deploying and Running VIs on an RT Target (Real-Time Module)

http://zone.ni.com/reference/en-XX/help/370622N-01/lvrtconcepts/deploying_running_vis_rttarget/

 

The automatic deployment of shared variables can create a deployment conflict:

 

“if you attempt to run a host VI that references a variable hosted on an RT target that is running a startup VI, LabVIEW returns a deployment conflict unless you disable automatic variable deployment. If automatic variable deployment is enabled when you attempt to run the VI, LabVIEW attempts to deploy all the variables that the VI references and returns a conflict when one or more of those variables is hosted on a device that is running a startup VI. In this case, disabling automatic variable deployment on the RT target hosting the variables allows you to run the host VI without encountering a deployment conflict.”

 

Regards,

 

Kyle S.
Applications Engineer
National Instruments
http://www.ni.com/support

Message 5 of 5
(3,145 Views)