From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

LV2 functional global array only inits element 0

Go to solution

Hi - using a functional global with several parallel loops  - it contains an array of clusters as its data.  The setup is your basic read/write structure (attached).  Upon starting the app, I initialize a 12 element array of clusters and write to the global.  Yet, when I try to write to the data later on, it appears that the only element that is not greyed out, is element 0 of the array, so any time I write to any other element, the data does not "stick".  Is this because the USR does not know how big it should be?  How do I code around this?  I have tried adding an init case for the global to no avail. I have used this in LV 7 with no problems, but in LV2011 no go - attached are both copies thx

Download All
0 Kudos
Message 1 of 4

If you only have read/write actions you'll need to read it out, add/modify and write it back. I'd add a "Add data" action that'd build the array internally with the new input.

Btw, you should wire your error in/out so you dont throw out errors ... 



G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
0 Kudos
Message 2 of 4
Accepted by topic author ET

It may seem a bit stupid, but are you sure you have not somewhere a copy of that VI laying around in your diagram that is configured to write into the buffer? Maybe hidden behind another node or structure?


The VI in itself seems to work exactly as I would suppose it should, which considering the triviality of it, would be only logical.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 4

Ah yes - thanks to both for responding - turns out I was writing to the array elsewhere

0 Kudos
Message 4 of 4