Showing results for 
Search instead for 
Did you mean: 

generate signal from decimal number

Go to solution



I have a program which calculate the heart beat from the ECG signal. I want to show the beats per minute on a chart with 60s of history plot.

From the vi who calculate the heart beat I get as output the string with the number, only when occur the peak wave, then I convert it to a number and then I place it to the offset of a simulated DC signal.


(In the chart below the beats per minute are always 60 because I'm simulating a sine signal with 1Hz.)


Screen Shot 2014-12-04 at 09.17.15.png       ------>     Screen Shot 2014-12-04 at 09.17.35.png


It works fine, but I would like to visualize not the peaks but a continuos line from point to point, like interpolation.

in this case, it would have been a orizontal line at 60 BPM.

I was thinking to store the last value of the string and keep it frozen until the next value update.

Do you have suggestions on how to do it?



0 Kudos
Message 1 of 3
Accepted by simo28

Not clear what you get as numbers, seems that you get zeros too, and do you get a decimal or a whatever 'dynamic' ??? value??

you puls-rate information could be ~45 to >180 values per minute!

Do you have to display exact one minute history?  (keep the last ~300 values with timestamps and use a XY diagram )  maybe a history chart could be configured to show


wait ..... here is a way:

I feed a chart (with 256 points of history) with a waveform. the wfrm only has one value in it's value array and a t0 . The chart is set to display 60 sec .  Seems to work

My simulation will output a min rate of ~45 BPM but you can beat it 😉



beat 1min.png


Greetings from Germany

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Message 2 of 3

I got illuminated by your vi, I used the shift register as you did for keep the previous value in input to the offset signal simulator, when the string is empty.. now it works perfectly! thank you Henrik!!


Screen Shot 2014-12-04 at 13.49.29.png

0 Kudos
Message 3 of 3