LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying cRIO as Shared Variable Engine

I am finishing up a project where a crio will be continuously recording data and the computer is running a program that will download the data once daily as well as comunicate with the program running on crio device over shared variables. Since the crio will be using a cellular modem to connect to the internet, connection loss is expected. For this reason we have made the crio serve the shared variables so that if connection is lost to the PC, the crio will continue to record data normally without problems when it writes to or reads from the shared variables.

 

The crio will be running headless. I built a real-time application and deployed it as startup successfully on the crio device without warnings or errors. I connected to it via font panel to confirm it started up and is working properly. I will eventually use the application builder to build an installer that will install everything needed to run the program on the PC side. However, when I open the 'Belle Glade System PC' and run it, it attempts to deploy the shared variables on the crio device. It warns me that it will close any applications running on the crio device. This is not what I want. The shared variable engine is already deployed on the crio device and the program is running. All the PC program (Belle Glade System PC) needs to do is run and connect to the shared variable engine already deployed. I am obviously doing something really fundamentally wrong here and I could use some help. 

 

belleglade project.PNG

---------------------------------
[will work for kudos]
Message 1 of 10
(6,393 Views)

I could really use some help.

 

I talked to someone who said that I had the library set to autodeploy so when I was attempting to run the PC program it was autodeploying the variables and trying to close the stuff on the crio. He said that when I right mouse click on the library I should be able to disable autodeploy. That option does not appear to be there though. 

 

It also got me wondering if maybe the reason the PC program is trying to deploy the shared variable library because it isn't deployed on the crio like I think it is.  Do you think I might need to deploy the shared variable library programatically in the program that I am deploying on the crio. I know that in general, if you create an application you need to use the programatic deploy so maybe the same thing applies with real-time applications?

 

I cant tell from the distributed system manager if the shared variable engine is deployed on the crio right now or not. I put the shared variable library in the 'always include' list of the build options so I would think it would deploy the library. 

 

 

---------------------------------
[will work for kudos]
Message 2 of 10
(6,364 Views)
So I am trying to achieve an architecture where I have two executibles communicating over shared variable. One on a pc, one on a crio. The crio needs to host the shared variable engine. How do I accomplesh this architecture? Do I need to bind the shared variables somehow? Do I need to deploy the shared variable library programatically?
---------------------------------
[will work for kudos]
Message 3 of 10
(6,357 Views)

I found this solution and I am going to try it. It seems pretty clear what I am doing wrong.

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=363840&query.id=1395666#M363840

---------------------------------
[will work for kudos]
Message 4 of 10
(6,354 Views)

Hey rex1030,

 

It sounds like you may have found the solution, but just in case, it sounds like the method you need to run is the Library method called Deploy Library

 

 Untitled.jpg

 

 

Executables do not auto deploy shared variables like the LabVIEW edit environment does.  You will need to include this method in your executable VI, or manually deploy the library if you wish for it to work with shared variables.

 

Chris_G
Sr Test Engineer
Medtronic, Inc.
Message 5 of 10
(6,342 Views)

LabVIEW is throwing an error saying that Library function is not supported for RT targets. I wanted to be able to run it in the RT code so that it could start up the shared variable engine it is hosting on its own, without the intervention of the PC. Is this possible?

 

From the documentation it seems that the PC can start a shared variable engine on itself, it can deploy it to the crio, but the crio can't deploy to itself like the PC can. That sucks. Any help?

---------------------------------
[will work for kudos]
Message 6 of 10
(6,314 Views)

Hello rex1030,

 

Unfortunately with an RT target, your only options are to either manually deploy the shared variable library, or to programmatically deploy from a compiled executable running on a host PC.  KB3UCBHM8T: How Do I Deploy Network Shared Variables from a Compiled Executable? goes over this in more detail.

Chris_G
Sr Test Engineer
Medtronic, Inc.
Message 7 of 10
(6,282 Views)

I found this http://objectmix.com/labview/350206-rt-networked-shared-variables-do-not-update.html

 

The key for me was "Do not wire shared variables to property nodes of front panel objects on a RT target. Reason - If the front panel is not open thru the web interface then the front panel is not active and cannot populate the shared variables."

Message 8 of 10
(5,834 Views)

I apologize for not posting the solution to the problem.

 

Basically what you end up having to do is create two nearly identical shared variable libraries, one on the pc and one on the crio. The library on the PC has each of its shared variables binded to the corrosponding variable in the cRIO Shared Variable library by PSP URL (ip address and variable location). To do this, open the PC shared variable library and go to the properties of a specific variable. Check "Enable Aliasing" and under the bind to drop down menu select PSP URL. Then hit browse and find the variable on the crio. Do this for each of the variables on the pc.

 

This option does not seem to be 100% reliable as it has trouble detecting connection problems between host PC and crio device. This is because shared variables look for a connection to the shared variable engine. However, both the pc and the crio have their own shared variable engine running as a host so there is always a connection as far as it knows, lol. This solution worked ok for me since I could not find a more relable option.

 

There is a better explaination on this post: http://forums.ni.com/t5/LabVIEW/cRIO-Shared-Variables-amp-stand-alone-application/m-p/797139?query.i...

 

---------------------------------
[will work for kudos]
Message 9 of 10
(5,830 Views)

Hy!

 

I´m trying to do remote monitoring over the internet too...

 

how did you connect the cRIO to the internet usind a cellphone modem? how did you interface the cRIO with the modem and how did you configure the IP so that the shared variable on the cRIO wold find the computer?

 

Thanks

Message 10 of 10
(5,167 Views)