02-26-2015 01:58 PM
Hey folks,
Labview novice here asking about shift registers. I went through the tutorials and tried to find as much help as I could before posting, but I think I just don't understand shift register functions as clearly as I should. I need to read integers out of an array, and operate a new-old kind of situation to read the difference in steps between two stepper motor positions. I've attached a photo of what I have now, obviously does not work. I'm looking for any suggestions to do this, or any corrections to my logic.
Solved! Go to Solution.
02-26-2015 02:07 PM
It looks like you just need to delete the feedback wire. The shift register takes care of your feedback already. The first shift register (upper register) will return the value that was just computed in your loop (same as feedback) and the lower one will return the value that was created 2 iterations ago. Hope that helps.
02-26-2015 02:34 PM - edited 02-26-2015 02:36 PM
(Please attach the actual VI instead of a blurry picture).
02-26-2015 02:39 PM - edited 02-26-2015 02:39 PM
Are you supposed to be iterating through those array elements? Then use an Autoindexing Tunnel instead of the shift register. Get rid of that feedback node. Instead, you want the feedback node to be INSIDE of the loop.
02-26-2015 02:49 PM - edited 02-26-2015 02:49 PM
altenbach wrote:
- You could also subtract the blue array from a subset shifted by one position and autoindex on the result. No shift register needed in the loop.
Here's what I had in mind.
02-26-2015 02:54 PM - edited 02-26-2015 02:55 PM
altenbach wrote:
- I think you want to autoindex the blue array and only use a shift register with a single left output. Now you get the current element from the autoindexing tunnel, which you can feed into the shift regsiter on the right. In the next iteration you get the next value from the autoindexing tunnel and the previous value from the shift register, etc.
Here's an example for that suggestion.
02-26-2015 03:20 PM