05-24-2024 05:17 AM
I'm having this heart rate monitor by using a pulse sensor HW 827. The problem is I can only detect a pulse when the signal is greater than a set value, because of this it will count multiple pulses if the wait timing is short. My question is how to count 1 pulse: when detecting a point greater than a set value and later lower than that value, the counter will +1. I have an image to demonstrate: the counter will +1 when 2 red points is detected. Thank you!
Solved! Go to Solution.
05-24-2024 07:21 AM
I used a flag to switch between rising and falling detection.
05-24-2024 12:10 PM
I forgot to mention, my teacher told me to only use shift register for this pulse detecting so if anyone have a solution using it would be great!
05-24-2024 03:43 PM
Hi mnakhoi,
ZYOng provided you with a solution that you can easily convert in to what you need i.e. using shift registers instead of feedback node. Your homework is for a reason. It is for you to learn and when you learn you become more confident by knowing more.
Try something on your own first and then reply here if you get stuck or if you have specific questions.
Read about:
1) Shift registers
2) Select function
3) Comparison Pallet
4) Understand LabVIEW data flow
5) Understand how FOR loop works
6) How to index array element, understand how they are auto indexed in a for loop
Showcase what you have learned then I can share my version of possible solution with you (Already made the VI for you).
You cannot ONLY use shift registers to get the desired result. There will be other elements that will go along with it.