09-02-2015 07:34 PM
Hi All,
I have a shared variable generated on a PC VI and I want to read this variable on a myRIO VI. I've simplified it down to a simple random number generator on my PC which updates every 1 second and writes to a shared variable node. I then have a random number receiver (shared variable read node) on my myRIO which should read this varable as it updates. However when I run both VIs the random number receiver on the myRIO does not update from a 0 value. Any thoughts on how to troubleshoot this problem?
The issue only seems to be happening when I try and share a variable between the PC and the myRIO. If I have the random number generator and receiver communicating through shared variable nodes on the same hardware, for instance both on the PC or both on the myRIO the shared variable is transmitted and updated perfectly. I have also made sure that the shared variable engine is installed on my myRIO and the variable is set to network published.
I've attached some screenshots of the block dagram and I am happy to upload the VIs if that makes it easier for you guys.
Thanks in advance!
Ben
Solved! Go to Solution.
09-03-2015 12:43 PM
Hi Ben,
Did you definitely deploy the variable? If you haven't make sure that you right click on the library (Random Number.lvlib) and select deploy all. This will push the variable to the network. If you have already done this and it still is not working I would try putting code on the myRIO that checks if the value is 0 and if it isn't turns on a user LED so you can be sure that it is not working.
Hopefully this helps!
09-03-2015 07:05 PM
Hi Scott,
Yup, I've definitely deployed the variable but still no solution unfortunately. I'll have a go linking it to the LED to try and pinpoint the problem and get back to you.
Cheers,
Ben
09-04-2015 10:13 PM
Ben,
You should also monitor the error out terminals of both the read and write shared variable nodes.
09-05-2015 11:07 AM
First, break the right to left habit. Now. With a VI that small, it simply doesn't make sense to bring your wire backwards. As things get more complex, that will make your code impossible to manage.
The most important thing you could have shown us was the settings for your SV. We can assume you're reading and writing the variable. Those images are mostly useless. What is your SVs scope? Is it target scoped? Is it network shared? Have you tried hosting it on the myRIO to see if you can read it on the PC?
09-07-2015 01:37 AM
Thanks for the tips natasftw, i'll keep that in mind for the future.
I managed to solve this issue this afternoon. It ended up being a firewall problem. I had previously allowed the NI variable engine through the firewall but that did not solve the problem. I visited this page (http://digital.ni.com/public.nsf/allkb/0D7B86F4B4D19A5E86256F9A006EECB1) and unblocked these three items.
C:\Windows\SysWOW64\lkads.exe
C:\Windows\SysWOW64\lktsrv.exe
C:\Program Files\National Instruments\Shared\Tagger\tagsrv.exe
Thank you all for your help, it's been much appreciated!
09-07-2015 01:38 AM - edited 09-07-2015 01:39 AM
Thanks for the tips natasftw, i'll keep that in mind for the future.
I managed to solve this issue this afternoon. It ended up being a firewall problem. I had previously allowed the NI variable engine through the firewall but that did not solve the problem. I visited this page (http://digital.ni.com/public.nsf/allkb/0D7B86F4B4D19A5E86256F9A006EECB1) and unblocked these three items.
C:\Windows\SysWOW64\lkads.exe
C:\Windows\SysWOW64\lktsrv.exe
C:\Program Files\National Instruments\Shared\Tagger\tagsrv.exe
Thank you all for your help, it's been much appreciated!
06-29-2018 04:27 AM
The link has been moved to the new place, it can be found here....!
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019KlxSAE
Thank you all!