08-27-2012 01:26 AM
Hey all,
i need to use the peak detector but labview8.5 says (NOT in base package ) what can i do ?
Best regards
Solved! Go to Solution.
08-27-2012 03:18 AM
Hi shangal,
Better look online for a "peak detection" algorithm.There are some ways to do it:
1. The LabVIEW peak detector using a least squares quadratic fit to find the peaks, with a filter of amplitude and width.
2.Another simple way: You can try applying a smoothing filter (use a moving or windowed average) and then look for peaks that way.
I would like to ask you what are you trying to do with the peak detection?Can you provide some more details?
08-27-2012 12:11 PM
DEAR danil33
well first of all thanks for being friendly ang looking to give some help,
i was actually trying to tell national instrument community that i am a new user for labview, as well as i am very new to this forum .i tried to get some help knowing that i am very new for graphical programming . i asked too many for help , but still considering me as a labview programmer , anyway hope you can understand me and gimme some help , i have 10 days left to submitt my Uni project.
i was trying to implement an ECG circuit that displays the heart signal on labview as well as the heart rate via serial port. i implemented the circuit and everythin works fine , but cant go further into labview programming .
i tried to use the examples provided by labview help (advanced serial VISA read and write) to start with . i dont need someone to do my work for me, but i need real cooperation. that;s it . anyway ...all i want to do is to take the ECG signal from the serial port, display it on labview , display heart rate, and i asked for peak detector for the purpose mentioned in the attachment below (see pictures ).i planned to give it also a beep sound with every single heart rate an and an alarm when the heart rate goes belo threshold .
i am really confused , and have no idea what to do .
anyway thank you for the reply dear friend .
08-27-2012 12:13 PM
sorry forgot to attach the other pictures.. :S
08-27-2012 12:39 PM - edited 08-27-2012 12:39 PM
If you only have the base package, you are not going to have the peak detector so you will have to figure something else out as already noted. Your version of LabVIEW is shown when you select Help>About LabVIEW.
Is your serial read working at all? Are you able to display the signal? You need to start with this and then go forward. Attaching images of a block diagram that everyone has does not explain at all what your problem is.
08-27-2012 01:35 PM
Dear Dennis_Knutson
i installed measurment and automation explorerand i tried to open a VISA session with the port i selected . it says session opened succesfully.when i click run continously some portion of a random signal appeared but disappeared eventually.
any suggestions.
08-27-2012 01:56 PM
First, you never want to use the run continous button and you never want to have Measurement & Automation Explorer open when you are running a VI. The VI you posted (which I assume you did not write), will run until you press stop or until an error is detected. If you are getting an error, you need to take note of that and provide the error code. The example you posted writes something to the device. Does your hardware require something to be received before it sends data? The VI you posted assumes a single byte is being transmitted by the hardware. You still have not provided any information on the hardware you are using. Does it in fact send a single byte? In other words, are you using an 8 bit A/D in this hardware? Is this hardware sending a termination character after each byte or after a set of bytes or nothing at all?
08-27-2012 02:06 PM
dear Dennis_Knutson
thanks for the reply and yes i borrowed the VI from someone else since i am very new to labview.
1-my hardware is an ECG sensor that should detects the heart signal as well as the heart rate.
2- no i dont wanna send any data to the device. the device should only send data to the labview to display as a graph.
3- i am using the microcontroller 16F874 from microship which has an A/D (8bit) and i used it also for the UART transmission.
4-i have a db9 male on my device.from which i only used 2 pins. pin2 to transmitt data to the PC and and pin5 grounded.
but the device should not receive data from PC.
hope this make it clear ..
08-27-2012 02:34 PM
Your answer poses new questions. Since it sounds like the sensor is sending two different signals, how do you know which byte is which? Is it one byte for heart signal and then one for rate? How do you know which is which? You need something in the micro code to differentiate the two and that has to be parsed in the LabVIEW program. What do you have for a sample rate? Is it slow enough for serial communication?
08-27-2012 02:40 PM
no it is only one single signal to be sent from my device to the PC. since it is an ECG signal so it has peaks . every peak should be considered as normal heart pulse. so the average pulses is called heart rate. for example a normal heart is about 85 beats per minute.
thank you sir 🙂