LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shift register initialization and while loop

I have a few shift registers in a program I have created and I am having trouble initializing them. I tried adding a constant "0" to the shift registers and even a control, but then the 0 remains throughout the entire run of the program. I found some answers to a similar question here , but I had trouble understanding their solutions and/or getting them to work.

Any thoughts on how I can get the shift registers initialized once the program is run each time?
0 Kudos
Message 1 of 2
(2,783 Views)
I'll assume your main loop is in its own While loop. You should also have some kind of initialization loop (a single sequence works good), to the left of your main loop, that is strictly for things like setting up arrays, shift registers, etc.
In this Init structure, place initializing constants for each shift register and wire to each shift register. For example, if you have an array of booleans in your main loop, create an array constant of booleans (A good way is to right click each shift reg, and select create constant).
As long as you wire in your init values from outside your main loop, they well not reset your main loop shift registers until you re-run your VI.
LV has an example (General > Arrays > Separate Array Values.VI) which gives ideas.
Good
luck with it, Doug
0 Kudos
Message 2 of 2
(2,783 Views)