> HI Brian! Have the same Problem. I'm new to labview -> havn't really
> got into the shift register thing. Is there really no way to directly
> access an array element and modify it? (my problem:an array should
> count how often a die fells on a specific number).

There are two different arrays you can manipulate, the front panel 
control, and a block diagram value on a signal.  You really should think 
of front panel controls as UI objects and not data objects.  Accessing 
them is more trouble and certainly more expensive than accessing the 
value in a signal.  The array primitives give you the ability to slice, 
dice, index, and replace elements however you like.  Updating element 9 
in array A in C either looks like A[9]= A[9] + 5; or can be shortened to 
A[9] += 5;  These are really the same, just a shortened syntax, and will 
execute in the same instructions.

In LV the operation is index, update, replace, but it is left to right 
instead of the left to right assignment of C.

Be sure to read up on shift registers because they are the most 
efficient way for LV's dataflow diagrams to recirculate data.  The last 
thing you want to do is store it in a UI item and then go get it again 
for the next iteration of the loop.

Greg McKaskle


Reply via email to