05-05-2022 07:42 AM
Yeah you are right😇. I'm just mentioned about to avoid LV in a same loop instead has the option to use FGV. Thanks
05-05-2022 10:19 AM
@Magesh003 wrote:
Yeah you are right😇. I'm just mentioned about to avoid LV in a same loop instead has the option to use FGV. Thanks
Still no reason to suggest a version which is only marginally better than the bad one they are trying to replace.
The only time I will use a local variable inside a loop would be if is it a case statement that is part of some UI handling code and I need to update a control or indicator on the front panel in multiple cases. While the preferred method would be to update the indicator outside of the case structure there are times where there are quite a few cases and the update will only occur in a couple of the cases. Rather than have a pass-through wire in every case I might use the local variable to update it in the few required cases. However, this is done intentionally and race conditions are not a factor.