LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Static Shift registers

Jarrod wrote;

"...shift registers are initialized to default values when the VI is first opened.

I'll try to think if there's a bona fide exception to this."

Do bugs count? Smiley Wink (there is a bug in LV 7.1 that will cause the value of a constant wired to a SR to to get updated).

I'd like to throw in a little hair splitting.

The value in a SR will remain in the SR even after the VI has gone idle. Another observation closely associated with this thought is that the VALIDITY of what is in the SR is not necessarily valid. Example: A queue reference. Even though the 'number" in the SR is still there, when the VI goes idle, LV will invalidate the the queue ref.

There used to be an example in the (Advanced application dev course) where a RPN claculator is developed to demo the power of an "action engine". That example would work even though the VI would go idle betweeen operations.

RE: Global rules on when to inititalize....

It depends!

Dig into NI's PID VI and you will see what I mean.

I hope this helps,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 11
(460 Views)