01-02-2009 12:46 PM - edited 01-02-2009 12:47 PM
I have created a simple application that consists of two VIs. First one is the host vi that runs on the development computer. Second vi runs on a RT target (rtfile.vi). rtfile just writes a random value to a shared variable when it runs. host vi continuously reads the shared variable. it also runs the rtfile vi on the press of a button. This is shown in the attachment.
Everything works great but when I enable RT FIFO in the shared variable, the variable does not get updated even though rtfile runs after the button is pressed. What would be causing it?
I have also tried moving the shared variable library to RT target and deploying it there, but it doesn't make any difference.
01-05-2009 11:03 AM
01-06-2009 06:00 AM - edited 01-06-2009 06:01 AM
Hi Abdel2,
Thanks for your post and I hope your well today.
I am sorry to see you've not received any support so far... but thankyou for not spamming the forum with duplicate posts!
I am a little confused about what exactly is happening..
So simply, you have a FIFO-enabled network-published shared variable which doesnt work?
And when you say it doesnt update - what value is being read from the variable?
This dev zone article contains good guidence on variables and FIFO enabled variables - take a look 😄
Using the LabVIEW Shared Variable
http://zone.ni.com/devzone/cda/tut/p/id/4679#toc2
Another thought - regarding where to place the libraries, please see this knowledgebase article - it explains the step you require.
When I Deploy My Application Why Do My Shared Variables No Longer Work?
http://digital.ni.com/public.nsf/allkb/AED9E710A06A6C56862574EF0053DFA1?OpenDocument
Hope this helps,
01-06-2009 05:57 PM
Thank you for the response. I did what the first article said (PSP binding) but it didn't make any difference.
This is very weird behaviour. I just modified the program so when I run a vi that reads the variable on the rt target, the whole thing seems to work. I am not sure why.
Anyways, I tried to make this thing even simpler:
I just created a vi on the rt target that writes a random variable once to a shared variable when it's run. Then I check the variable value in the system manager. With RT FIFO enabled, the value does not get updated (even after I manually refresh). As soon as I enable RT FIFO, it gets updated automatically after each run of the vi that writes to the shared variable.
Is it a common behaviour or is there something wrong with my network settings?
01-07-2009 03:53 AM
Hi Abdel 2,
Thanks for your reply and I hope your well today.
Ive seen the behaviour you mentioned. I beleive this is because FIFOs are different to standard variables.
The problems with running the code once, is every time you must deploy the variable - and the variable hasn't been deployed you can't read from it. So by placing both in a while loop (with the same iteration rate) the variable is deployed first, written to and then read from (with a constant delay, which is why you'll require multiple elements in your FIFO).
I wonder if the FIFO only works if its being read from and written to continously...otherwise data is lost.
07-09-2010 06:55 AM
Dear Hillman,
I also have problem with RT FIFO and network buffering for network shared variable. In my application i am sending 8-channel data form PXI (RT) system to host PC. My acquisition rate is 100Hz. i have used network share variable to send data to host PC.
My network Shared variable is of data type "Array of Double waveform"
Initially i have set network buffer size (1) Number of arrays 10, (2) Number of waveforms 1 and (3) Points per waveform 1.
Then data was lost. If i send 1000 data point i got abound 750 points.
Then i set network buffer (1) Number of arrays 10000, (2) Number of waveforms 8 and (3) Points per waveform 10.
I am getting all data points but each time data acquired on PXI and displayed on host is delayed. My application is triggered based. When PXI gets trigger pulse data acquisition start and stop after 1000 data point, then again become ready for trigger and so on...
At each trigger the delay of data at host increase till i restard PXI application, means redeployed RT VI in PXI.
To solve this problem i enabled RT FIFO for this variable. But i got wrong data at Host PC. Host reading data with inbetween zero data point.
May be i am not under stood how to configure Network shared variable.
Please help me how i can get all data at host PC send by PXI on ethernet.
Thank you
--Vishnu