Showing results for 
Search instead for 
Did you mean: 

channel wire reentrant sub vi



I am going over Stephen's and Jeff K's presentation from NI week about channel wires.

I have a question on the following slide.

So there are 4 re-entrant subvi's on a channel.  The channel ends on the display loop.

Sooo what is getting displayed in the display loop and what data is used in each sub-vi?  The output of each re-rentrant VI and the output  of the generate signal loop?  It looks like I have 5 writers (1 generate loop and 4 re-entrant vi's).  I also have 5 readers (display loop and the 4 re-entrant vi's).  This seems very confusing.   Who gets what data when?


Can somebody please set me straight?





Dan Shangraw, P.E.

Download AST Unit Tester






0 Kudos
Message 1 of 5

You have five channels, each with a single writer and a single reader, which hook together in a simple straight line.  

They're supposed to look like pipes.  If these were storage tanks connected by pipes, would you be confused as to where the water was flowing?

0 Kudos
Message 2 of 5

So sub VI 1 consumes the data from the Generate signal loop and then passes that data to sub VI 2 and so on and so forth all the way to the display signal loop?



Dan Shangraw, P.E.

Download AST Unit Tester






0 Kudos
Message 3 of 5


0 Kudos
Message 4 of 5

Oops -- this is the second time I'm pretty sure I created a Post, but probably forgot to push the "Post" button ...


Each of the sub-VIs is a "Filter Stage".  You stream data in, it pulls out just enough data to compute the next data point (based on the kind of filter you have inside), then this is placed in the output stream.  Then you loop and get more data, enough to generate the next point that you put in the output stream, and loop ...


The point is, data goes in the first "pipe", makes its way through a Stage and out the pipe to the next Stage.  If each Stage requires 5 input points before it starts outputting points, then four stages will result in a 20-point delay, which at, say, 44KHz, is less than a millisecond delay from input to output.  Data just "streams" though this multi-stage filter.


Bob Schor

0 Kudos
Message 5 of 5