LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data copies and circular buffering

I should know the answer to that Q (I think).

Operate data = Data that is used in the code
Indicator data = Data user sees and acts on up until they click out the object
Default data = What is put back in the object when we restore defaults.

I maybe wrong.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 13
(725 Views)
It is indeed a weird situation. A few days ago there was another thread which showed that using a local variable was indeed faster, then anything.

Here we have a situation where using local variable is memory efficient. Some one from Ni should chime in.

Here is what I have noticed. If you change the vi Say remove the loacl Variable and save it. Dont Run it and check what the Memory Usage is. It is to the order of 8M which is correct.

What I also did is went to Tools->Advanced->Buffer Allocations And Selected Only Arrays. Then clicked refresh. This puts a Black dot on every place Buffer is allocated. It flashes when refreshed.

Well, Witout the local variable, Buffer is allocated at the Data In, Shift Register and Data Out ie 3 places. With the local Variable the buffer allocation is only at 2 places, the local Varable and Data In terminal. What's going on. By Wiring the input of shift register, I think LV uses the Data Out memory space for Shift register. And saves on One buffer and I beleive Local Variable is only a Pointer to the Data Out terminal

All this is conjecture, the other puzzling thing is memory Usage in Vi Properties which does not match the ctaul memory that should be allocated. May be it is calculating erroneously?
Good Luck!

Mache
0 Kudos
Message 12 of 13
(719 Views)
My version of circular buffering. Write case a little different.

Requires too much memory, make LabVIEW RT OS crash
(PXI-8186, LabVIEW RT 7.1, DAQmx 7.3, 512 MB RAM, 256 Channels, 200 Sample/sec/Channel, for 10 sec).
This VI runs ok on WinXP.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 13 of 13
(710 Views)