03-01-2016 09:42 AM
Hi,
How do you intialize the shift register (inside the second for loop) so that it starts from 0 everytime the program runs. I have tried attaching a 0 constant to the left shift register, but that just resets the register every time it goes through the inner loop.
Thanks
Solved! Go to Solution.
03-01-2016 09:46 AM
03-01-2016 09:47 AM
It is not completely clear exactly what you want it to do. You may need an additional shift register on the outer loop. Initialize that to zero. Inside the outer loop wire the inside left terminal to the outside left terminal of the inner loop shift register and similarly wire the outputs.
Lynn
03-01-2016
09:48 AM
- last edited on
12-10-2024
01:31 PM
by
Content Cleaner
You haven't included the rest of your program, so it's hard to tell. You need to set the value on the farthest out loop because everything inside the top level loop will get reset unless you pass that memory space from iteration to iteration.
Follow the dataflow to really understand why you need to do it this way.
LabVIEW programming is based entirely on dataflow and parallelism. This is incredibly powerful and has lead to its success over the years (coupled with the graphical programming), but is usually one of the first things that new developers stumble over. The Highlight Execution feature is a great way to watch how your application utilizes dataflow.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
03-01-2016 09:59 AM
There are other ways to do this as well if you really want to avoid data being passed outside your little loop. You can get fancy with a feedback node and an initialization terminal, or your can use a First Call? boolean.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'