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.
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.
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!
What LabVIEW version is this?
There are a lot of very questionable constructs:
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?
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)
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 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.