LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert square wave to sinc wave

Solved!
Go to solution

The square wave generator in my example outputs a DC signal because the amplitude is set to 0 and the offset is set to 1.  With 0 amplitude, you won't get any pulses.  I did this just to plot a straight line between the triangle waves.

 

I don't understand what you mean by converting a square wave to an EKG signal.   Is the square wave modulated in some form?  Does the pulse duration and frequency change as the EKG voltage changes?

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 21 of 61
(1,962 Views)

 


@tbob wrote:

I don't understand what you mean by converting a square wave to an EKG signal.   Is the square wave modulated in some form?  Does the pulse duration and frequency change as the EKG voltage changes?


Yeah, I didn't quite understand that either. I assumed it meant that the EKG pulse happened when the square wave was at the high value. Or maybe the EKG pulse was centered at the transition from high to low. Extremely vague statements.

 

0 Kudos
Message 22 of 61
(1,954 Views)

@smercurio_fc wrote:

 

Yeah, I didn't quite understand that either. I assumed it meant that the EKG pulse happened when the square wave was at the high value. Or maybe the EKG pulse was centered at the transition from high to low. Extremely vague statements.

 


I'm thinking pulse modulation.  Faster pulses for higher voltages.  Or pulse width modulation, smaller pulse width for higher voltages.  That would be quite a challange to demodulate a PWM signal.  Maybe the OP can post a picture of the square wave and its corresponding EKG.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 23 of 61
(1,949 Views)

I don't think there is anything that will convert square wave to EKG, unless develop the code. My project is to convert square wave of 920 ms/cycle with 4.65 V peak to look a like EKG signal. It doesn't necessarily have to be real EKG signal, it just needs to resemble it ( basically talking about PQRST peaks). 

Your program generates dc line. In my project I have to use the square wave (pulse) to get to look like EKG signal. When I use my above specifications, it gives me square waves on the final graph again. I was thinking if there is any way to cut off the peaks of those square waves and just make it look like yours, straight lines in beginning, between, and end. And then may be it will resemble EKG signal!

0 Kudos
Message 24 of 61
(1,939 Views)

 Why are you wanting to take a square wave and make it look like an EKG signal?  This makes no sense.  Whats the purpose of using a square wave to start off with?    By passing it through a filter, you could round off a bit.  But you can filter it though the wazoo and you won't get it to look like an EKG.  I don't see any purpose of doing this when you can generate an EKG using my method.

- tbob

Inventor of the WORM Global
0 Kudos
Message 25 of 61
(1,935 Views)

 


 

 I assumed it meant that the EKG pulse happened when the square wave was at the high value.

 


  yes, the EKG signals need to be generated when the square waves are generated, simultaneously. We just need to have two graphs (square wave from the pump and the EKG) to show, that they are the same, just different forms.

 

0 Kudos
Message 26 of 61
(1,933 Views)

I think you are saying that you want to generate an ECG simulation which is triggered by the square wave from the pump.  In other words you want one ECG QRS cycle for each fluid pulse or each cycle of the square wave produced by the pump.  Is this a correct interpretation of what you are asking?

 

Lynn

0 Kudos
Message 27 of 61
(1,916 Views)

Yes, that is exactly what I meant. It just needs to simulate EKG look a like signal. Thank you!

0 Kudos
Message 28 of 61
(1,911 Views)

And as I noted, you can change the look of the ekg signal that tbob generated (such as the peak values, frequency, and duty cycle) to match your square wave's frequency and duty cycle by changing the parameters. Did you even try?

0 Kudos
Message 29 of 61
(1,903 Views)

I tried, but it's no good. It will give me squares (pulses) on the final graph. I don't want square waves to be displayed on the final graph except EKG signal. At the same time, I want second graph that is hooked up to the square generator, which display squares (pulses). So that it would seem the squares are converted to EKG.

0 Kudos
Message 30 of 61
(1,893 Views)