It appears that you are using Replace Array Subset (which is good), but the array you are replacing (Output) is empty. Replacing an element in an empty array has no effect. From the Detailed Help for Repalce Array Subset:
If any index is negative or larger than the corresponding dimension in n-dimension array the function has no effect.
Initialize Output to be the same size as Input Array or to have 11 elements, whichever is smaller. If you move Input array to the right of the for loop and use autoindexing, the Index array is not required. If Input Array and Output Array will always be the same size, you do not need Output at all. Initialize the array outside the loop and wire it to a shift register.
I am not sure what you are doing but a graph might be more appropriate than a chart since you write the complete array on each iteration.
thank you, to use Replace Array Subset, I have to unitialze values, before that, all values are gray, but now, thing is worse or I should say i didnt know how to eliminate my Output array and replace it with shift register...T_T
Here is the way to connect it via a shift register. Note that I also moved Input Array outside the loop and used autoindexing. I also used Initialize Array rather than an array constant. There is nothing wrong with using an array constant, but using Initialize Array allows the program to adapt to the size of Input Array.
As noted on the diagram I could not hook up the data wire from the Fuzzy Controller.vi because I do not have that subVI. You will need to make that connection before you test.
This is called professionalism. Compare my code with yours, I feel I have a long way to go....
thanks, Lynn, but last question, I redo everything according to your code and hit run, the output is all zero... This is weird. If my fuzzy system is not that good, it cannot be all zero, no?
Also, every time I open the code, I need to manually initialize all values in the input array, this is annoying. Can LabView remember all my values? In Matlab, All I did is just write input = [7 5 6 7 8 5 3 4 5...etc]
Context-click on the Input array control on the front panel and choose Make Current Values Default from the pop-up menu. Then save the VI. That will preserve the data. You can still change it manually any time you want to run with different data.
Your code is not bad. I have seen much worse. If you have not done so, I recommend that you spend the time to work through the on-line Getting Started tutorials. Also check out the LV Style Guide.
Tip 1: While programming, always keep the Context Help window visible. It has lots of useful information.
Tip 2: Explore the menus. You might be surprised at what you can find there.