04-22-2012 02:20 PM
04-22-2012 02:54 PM
The protocol on this board is to avoid the use of texting abbreviations. Please use complete words.
One good way to learn about things like the shift register is to write a simple program and run it with Execution Highlighting (the light bulb in the block diagram toolbar) turned on.
Run this several times with Highlight Execution on. Then disconnect the constant (-2) from the left side of the shift register and run it again several times. You will see the difference that initializing the shift register makes.
It is possible that you may not want to initialize the shift regsiter when running as a subVI. If you do not, the previous value will still be there when the the subVI is called again. If it is a subVI, you will not want the stop button and you may only want to run it one iteration of the loop each time a new value is available at AI0.
Lynn