04-14-2015 10:09 AM
Hi again guys
I have built a startup executable of my RT.vi file and let it run but in that case it didn`t deploy the files that it deploys when I run it normally. Also, having it running continuously might damage the sensors that I have been using with my cRIO. Is there an alternative way to deploy all the files that are deployed normally from my RT.vi within a block diagram or with some other method? Or is there another way of running my Host.vi from my RT.vi?
@Bob
Yes, I develop my Real-Time Application using LabVIEW Project which is a part of my project. The thing is that I have to insert some input parameters for both Host and RT vi files of mine first before running. So I cannot just right click and let them run.
Thanks to all of you with the help.
Baris
04-14-2015 12:48 PM
What specific error occurs?
When you open the VI reference, are you doing it by path, or by VI name? When you build the RT application, the path will change, but you can use a string containing the name of the VI instead of a full path. If there's a VI in memory by that name (which there should be, if your startup VI references it), then you'll get a reference to that VI. In the build specification, you'll need to change the option so it doesn't remove the front panel of the VI you want to load.
I've never tried this, but I think you can simply deploy the VIs to the RT target without running anything, and then use VI server to load the VI by its path. However you'll need to use the path on the RT target, which is NOT the same as where the VI is located on your development machine. Maybe that solves your problem?
While you can eventually make this work, the basic problem is that you've chosen a poor architecture. The standard approach with any RT target does not rely on the front panel of any VI running on the RT system. Instead, the RT code implements some type of communication (shared variables, network streams, a TCP server) that allows it to exchange data with a VI on the desktop machine. The desktop application provides a way to interact with the RT program.
What do you mean by you're worried that running the code continuously will damage the sensors? You can have code running that does little except wait for an incoming connection, and only read from the sensor when a connection is established.