LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

initialize recursive array - array keeps old values?

Hello together,
i have trouble with using recursive arrays. Running the program the first time works fine, but when I start it a second time the old values in the array are not replaced. They are only replaced, when i have edited the programm code before running the prog. It's very strange...
 
Here is the prog:
 
 
Everytime I run the program the Array should have the size 3 (not 6, 9, ...). How to do this?
 
The problem might be, that i haven't initialized the array, but how can this be done with recursive used arrays?
 
An invoke node to reset the output array at the start of the program won't help.
 
Does anybody have a solution?
 
Thanks a lot,
 -Peter

Message Edited by FaNan on 07-06-2007 03:09 AM

0 Kudos
Message 1 of 4
(2,547 Views)
Hi FaNan,

first:
You should use 'Replace Array Subset' instead of 'Insert into array' - that's the reason why your array grows on and on.

2nd:
I prefer standard shift registers - they better show the dataflow (that's just my opinion).

See attached example in LV71!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,534 Views)
Initialize array as shown in the attached file
 
0 Kudos
Message 3 of 4
(2,533 Views)
Hi sowji,

you can't convert a BMP to a JPG just by renaming!
Please attach other picture formats here - your 447kb BMP can be converted e.g to a 10kb PNG...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,530 Views)