02-13-2006 09:02 AM
02-15-2006 04:14 AM
02-17-2006 04:44 AM
11-15-2007 02:33 PM
I have this same question (and have found multiple threads that end at this same point). All the threads say you can use shared variables with buffering for asynch communication - but none tell you how to read the whole buffer on the slower (i.e. PC) process.
If I have a high priority process writing to a shared variable on a RT PXI chasis at say 5ms rate... I have a PC reading this buffer running at 100ms loop, how do I read the whole buffer?
The shared variable FIFO only gives you the oldest sample. For example if I want to plot the samples on a chart; I don't want the PC to update the chart every 5ms; I want it to plot the 100ms worth of buffer at each iteration.
11-16-2007 05:05 AM
11-21-2007 11:51 AM
It looks as if you are using LV8.5, I am using 8.2.1 unfortunatly. So I can not view your VI. could you jpeg it?
With regards to the for loop, how do you know how many interations to run? As far as I know, there is no way to get the buffersize of the Global Variable FIFO? For that matter, I can not even use a while loop that runs till it is empty?
What I would like to do is have my RT controller collect at a deterministic fast rate dump into a Global FIFO buffer and the host PC running in a slower loop empty and plot the buffer at a slower rate.
11-22-2007 08:30 AM
12-03-2007 12:59 PM
Andre,
Thanks - that worked. I had to make 1 small change, in 8.2 I needed to use error code 180121602.
I also needed to run the check on the error to a case structure. If the error is false I append my waveform (from the network variable) to the waveform in a shift register inside the loop. I had some odd things happeing otherwise.
For the NI folks - It would be nice if there was some easier way to just say "give me everything currently in the buffer".
Regards,
Brad