I have attached a VI that should do what you want if you have Labview 7.1 and Advanced Analysis Library.
If not, then this is what the VI does.
First you process the signal a little to enhance the R wave.
1. Take the derivative of the signal (difference function), name this signal X
2. Perform a Hilbert Transform of X to get Y
3. Combine to get Z = X + iY (complex) and take the magnitude of Z
4. This process will enhance the R wave amplitude in relation to the rest of the signal
Then you perform a peak detection to find all of the peaks and their locations.
Find the difference between the peaks to get the number of points between beats.
Divide this number by (Sampling Rate * 60) and invert the number to convert to beats/min.
The Advanced Analysis Library has the Derivative, Peak Detect, and Hilbert Transform functions used in the VI. I tried to save it as version 7.0 but it wouldn't let me.
Randall Pursley