01-09-2015 09:56 AM
I have a project comprising a RT VI running on a cRIO-9030, and a host VI running on a desktop computer. The two programs communicate via shared variables which are hosted on the cRIO. As shown, when I run the VIs from the project, everything works as intended. When I compile the RT VI into a startup executable and deploy this to the cRIO, along with the shared variable libraries (targeted to the Support folder in the build specification), I am unable to connect to the running real-time executable.
I have "Disable Autodeploy Variables" checked on the cRIO target, so I no longer get the prompt to stop the running application in order to deploy the variables. The host VI opens and appears to run, but has no connection to the shared variables (data does not update). Compiling the host VI as an executable and running it outside of the project results in the same behaviour.
I have read a few relevant posts / knowledgebase articles pertaining to this problem, but still can't seem to figure a way around it. I note a number of articles addressing binding duplicate sets of variables, but this is counter to my intended eventual behaviour for this system: I will eventually have a number of identical cRIO controllers all runnning the same RT executable, and want to be able to have one host VI which allows the user to select from a list of available controllers (using the system configuration VIs), and extract the hostname of the selected controller, which would subsequently be used for programmatic addressing of the variables on the host VI side.
In any case, I'd like to start with simply being able to get this first controller working without an open connection to the RT VI from the project. With the startup executable deployed, I have verified via programmed LED behaviour that both the RT application and the FPGA are running on the cRIO. The problem, I suspect, has to do with the shared variables, but I am unsure where to go from here. I would like to connect to the running RT executable from the host VI (in the project) to verify that the compiled RT executable is functioning as intended, and then subsequently compile the host VI into an executable that can be run from any desktop computer on the local subnet.
Thoughts?
Solved! Go to Solution.
01-09-2015 05:09 PM
It would appear that the error has now been corrected. There were three things I changed: the startup.aliases file in the startup directory on the target (home:/lvuser/natinst/bin) had "localhost" set as the alias for the controller. I changed this to the controller's IP address. Next, I had some file I/O functions in my RT application which used paths relative to the path obtained with the "Current VI's Path" VI. As this path changes depending on location / execution system, I had to create a VI which used the Application:Kind property with a case structure to appropriately strip / build the desired data file paths regardless of execution system. This may have broken my RT application. Finally, I had a property node in one of my RT SubVIs which attempted to modify an indicator in the SubVI, which is not supported in a compiled RT executable. I may have done this for debugging purposes somewhere along the way, but in any case, I removed it, and after recompiling and deploying the RT executable, everything seems to be working as intended now. The host VI on the desktop computer can connect to the RT application through the project, and when compiled into an executable, that works too.