12-29-2009 07:06 AM
Hi all,
I have problem here...
Why am I getting noises when using shared variables in my labview code...
but when I remove these shared_varibles, noises are totally reduced...
I am using shared variable for data logging. For data logging, I make a special VI file under My Computer. While my real code is under CRIO.
These two VIs are communicating using shared variables. Is there any better way to do data logging in real time beside using shared variables?
I tried to do data logging directly at CRIO but it always fails.. that's why I make a special VI under My Computer for data logging...
But if shared variables create noises... my data logging is not valid any more...
Please help me... 🙂
I uploaded some picture.. I hope it makes my problem clear to you all...
Solved! Go to Solution.
12-29-2009 10:01 AM
Hello auralius,
Are those plots you posted from the velocity graph on the block diagram?
I think the shared variables are affecting the timing of your loop and therefore affecting the result. I'd suggest adding to code to check if any of the iterations are late. I suspect that the late iterations will correspond to the bad data you show.
You can try enabling the RT FIFO on the shared variable or you may need to add a second communciation loop and use some form of local communication to pass data to it.
Take a look at http://zone.ni.com/reference/en-XX/help/370622G-01/TOC1.htm, specifically the Sharing Data in Deterministic Applications section for more information.
Let me know how it goes,
Sebastian
12-30-2009 10:40 AM
Thank you for your reply Sebastian...
I managed to solve the problem...
As you can see... In my previous code... I write the data to RT shared variable. This RT shared variable is configured to be single porcess. Than data will be sent to another shared varible (without RT) which is configured to be network published (in second frame)...
I remove the second frame because now I write directly to network-published-RTshared variable...
Thats how I solve it...
🙂