My name is Jonathan & I work in the Applications Engineering department at NI here in the UK.
Iam slightly confused as to what you are asking, I have looked at your code and as i understand it you are looking to take the data recorded in the ECG signal graph and output that to the envelope graphs in order to get the 'envelope'? im guessing thbat the 'waveform graph 2' is to simulate the data you want to send over.
If this is correct then I have attached your code wit hsome alterations, firstly I have used the ECG vi as a sub vi and made use of the connector pane to be able to output the graph data. I have also made graph data output usiing a mixed signal waveform graph to make teh data easily manipulated on the output.
On the Envelope vi i have made teh controls for the sub VI available on the front panel of this VI and then unbundled the graph data to be able to get the envelope, this outputs what i presume is the data you are looking to achieve.
I hope this resolves your issue and if you have any further problems or want anything clarifying please don't hesitate to reply back.