LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Putting a timed loop in a sub-vi

Hello,

If you are using tunnels the following applies: tunnel in = each value is the same, the value passed in, tunnel out = takes on the value of the last iteration

When using shift-registers the following applies: shift R in = first iteration takes on the value passed in, nth iteration takes on nth-1 value shift R out = same as tunnel out.

I typically use shift-registers in order to have modular code that can be reused on other targets. For an example if you program an Embedded target and you pass a large array through a loop tunnel, the original value must be copied into the array location at the beginning of each iteration which can be rather costly. A shift register on the other hand doesn't perform this copy iteration.

See this document:

http://zone.ni.com/devzone/cda/tut/p/id/3747

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 11 of 11
(569 Views)