10-23-2008 04:44 AM
Hi !
I developped a very simple application acquiring analog signals (NI9215) and switching on/off digital outputs (NI9472) using a cRIO (9012). Data is transmitted to the host program through shared variables.
I created an executable from the code to be ran by the cRIO, set it at "Run at Startup" and deployed it.
I did the same thing with the host program and created an installer from the exe. As I'm using shared variables to transmitt acquisition result, I placed them in the support directory (data) when building the executable (Distribution.exe).
This executable perfectly runs on my computer.
I used the installer to install the program on another computer. This
computer as its IP adress in the same subnet as my computer. But the
shared variables never deliver other data than their default values so
I guess there is a communication problem...
Can somebody help me ?
Solved! Go to Solution.
10-23-2008 06:15 AM
Hi zyl7,
Thanks for the post!
This is a common issue - I think...
The problem is you need to deploy two setes of shared variables in two llb's. You need the 'real' variables on the cRIO - and to be deployed manually (see link) and a second llb on the host pc, which are binded to the real variables on the cRIO. This is because the local machine will look locally for the shared variables, which obviously arn't the ones with the data of the cRIO.
Maybe in clearer words,
When you make an exe of a project using shared variables, you must have a local copy of the variables on the deployment machine which are then binded to the 'real' shared variables stored on the target - cRIO in this case.
This means in your project view:
1) Create shared variables in the normal manor on the cRIO.
2) Create shared variables on the Host PC - llb under the Host Pc In the project and then enable Aliasing and then bind to PSP UR.
Let me know how this works,
Kind Regards
11-12-2008 08:04 AM
Hi All,
Just to let you know there is now a Knowledgebase article concerning this issue!
When I Deploy My Application Why Do My Shared Variables No Longer Work?
Happy LabVIEWing...
Kind Regards,
James.
09-24-2009 10:53 PM
Hi James,
I was reading another thread that linked to here. I went to look at your knowledge base article link and my browser showed an error saying I am not authorized to view that link.
Can you check on this link and get the security settings opened up? Or post whatever link that will allow us out in the general public to view it?
10-13-2009 09:37 AM
ditto on the broken link.
I am having a similar issue with shared variables when deploying to a stand alone application. I am still trying to figure out what is going on so I will try to explain as best as possible:
I am developing an application that reads sensor values using a cRIO 9073 and a TPC 2106T. I am developing the application on a Windows XP PC running Labview 8.6. I have a library of shared variables to transfer data between the cRIO and the touch panel.
When I run my application from the Windows PC, shared variables work just fine. But as soon as I set the cRIO to deploy the application on startup, weird things started happening with the program. By weird I mean that shared variables seem to sometimes keep old values, instead of initializing properly like they do when I run from the development machine.
I guess my question is: What happens to the shared variables when the host VI is no longer running? I noticed that if I stop my host vi on the cRIO, I cannot longer write to shared variables from the touch panel. But the touch panel still has references to the shared variables and continues to read the last value. If I run the host vi again (From the touch panel, not on reboot), I think the host vi initializes the shared variables as expected, but then the vi running on the touch panel updates them again with the old values.
Are there any special considerations to keep in mind with shared variables when deploying an application as a stand alone?
I apologized if this sounds too convoluted, I am trying to make sense of it all...
Thank you
10-15-2009 05:18 AM
Dear Henik2,
Fisrt of all, prefer create a new thread than using an old one; your message will be more visible. Just add a link to a related topic in your post if necessary.
About shared variables, you have to clearly understand how does it works. Shared Variable relies on the Shard Variable Engine (SVE). You can assimilate the SVE to a server tha twill handle the variables for you over th network. If this kind of server is located on the host computer, the cRIO and/or the TPC will not be able to update and get value from the SVE when disconnected form the host computer.
You have to determine wich of the three execution targets has to host the SVE. basically, it i on the cRIO. So in your project, the library containing the variables must be located under the cRIO.
Then, consider that the SVE in one more process that runs on the cRIO target. Do not write or read a value to a shared variable if not necessary, you will just use cRIO CPU time for nothing. One other important parameter is the network publication. Avoid to publish every shared variables if not necessary. You may want to reduce the publication period inorder to decreas the CPU load.
Hope this helps,
10-19-2009 08:49 AM
Thank you Mathieu R.
I am rather new to these forums and I am still figuring out the proper ettiquete so I appreciate your feedback.
We are hosting the shared variables on the cRIO, and the logic of our application was implemented on the FPGA directly so the cRIO vi basically transfers data between the FPGA and the TPC for display and control via shared variables.
We have been concerned with network traffic from the beginning and have made an effort to reduce the number of shared variables and shared variable nodes being used. We identified a few bugs that were making our application behave oddly when disconnected from the development PC, but as we test and fine tune our stand alone application, is there a way to monitor network traffic?
This is the first time I hear about publication period so I will think about it as I improve my application. However, I think that being able to assess the network load should help me improve my application performance.
Thank you,
Henik
10-23-2009 03:55 AM
Hello Henik,
I think you should find what you need in the following Google search :
http://www.google.fr/search?hl=fr&q=network+load+monitor&meta=&aq=f&oq=
Olivier L. | Certified LabVIEW Developer
11-25-2009 01:18 PM
When you build your installer, you must include "NI Variable Engine"
There are now 2 versions of the LabVIEW runtime engine - the minimum does not include the variable engine, the standard does.
See if that helps any