Showing results for 
Search instead for 
Did you mean: 

Can someone explain the following LabVIEW block diagram...

I found this part of the block diagram while reading a research paper on extraction of ECG features using LabVIEW. Im unable to understand the LabVIEW block diagram given in the paper. Im attatching a snapshot of the code here with. I guess it is not that difficult for the experts over here in the community, so expecting a help from the community.

Im also attatching the research paper I mentioned earlier.

Thank you.

Download All
0 Kudos
Message 1 of 14

Hi HimajaAK,


The code is a bit jumbled, but here is how I would start interpreting it. The rectangles with N in the top left corner (there are 3 of them) is a For loop. They should all run for only 1 iteration, and the one on the top left has no function (besides wrapping the code inside of it). It says each time the code is run, it will pick off the next value from the input signal.


The other two loops have shift registers on them (the up and down pointing boxes on edge of the loop). Every time the code is run, the shift register on the left remembers what was put into the shift register straight across on its right on the last iteration. A stacked shift register on the left means the one beneath remembers from 2 iterations ago. 


Besides that, it is just arithmetic, multiplication, addition, subtraction. I can't make out the symbol in the bottom right, it looks like the negate function.

0 Kudos
Message 2 of 14


A one cycle for loop with a two element un-initialized shift register?  No, I do not think anyone can explain that code!  What do you want to do?  I promise we can do better than that!

Scientists STAND on the shoulders of giants! They don't ride "piggyback" to keep their heads down.

"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 14

What LabVIEW version is this?


There are a lot of very questionable constructs:

  • Is this the entire code or are there more things around it?
  • Each of the three FOR loops only iterate once per run, so they basically just act as scaffolding for the shift registers and feedback nodes. That poses the question why we have three FOR loops if one loop would be plenty for all this.
  • (The first loop iterates only once, because you convert the signals to an array of signals with exactly one element).
  • Where is the initializer of the feedback node? (seems to be ancient LabVIEW)
  • I assume this is a non-reentrant subVI and it gets called consecutively over a list of files. Is this correct?
  • It is unusual to wire to the right shift register from an incoming tunnel.


Do you know who wrote this? Is the program actually "working" (whatever that means)?

How familiar is the programmer with LabVIEW?

Can you attach the actual VI instead of a picture? Are any terminals assigned?

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 14

The leftmost For loop gets the last element of the file (in a silly way).

The middle loop does calculation with the previous and second previous data, and stores this files data for next call.

The right loop does nothing as it's not connected to anything (in principle it does some smoothing with previous and second previous data)


G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
0 Kudos
Message 5 of 14

Thanks. That was helpful 🙂

0 Kudos
Message 6 of 14

Thanks for the reply. I was actually trying to implement the difference equations of the form p(n)=x(n-16)-1/32[y(n-1)+x(n)-x(n-32)]

I was reading this paper  (which I mentioned earlier) and was struck at that part of the VI (the image which I attatched).

So, if you could suggest me the way such equations are implemented, it would be of great help.

Thank you.

0 Kudos
Message 7 of 14

Thanks 🙂

0 Kudos
Message 8 of 14

Thank you for your answer.

This is not the entire code. It's a part of another VI. Im attatching the snapshot of the entire VI.

Sadly, I don't have the actual VI 😞 It is a snapshot taken from the research paper which I'm attatching herewith. Also, I guess it is a working code since the authors have published a paper on it. I have many doubts regarding that program and I would be much obliged if you could go through that paper so that you will get a clear idea of that program.

Thank you

Download All
0 Kudos
Message 9 of 14

@HimajaAk wrote:

Im attatching the snapshot of the entire VI.

You attached the same things we've see earlier. Can we move forward instead?

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 10 of 14