Convert square wave to sinc wave

Can anyone please show me how to convert square wave to sinc wave?
Solved!
Go to Solution.

Use the wave generator funtions found in palette Signal Processing - Waveform Generation.  There are sine and triangle waveform generating functions there.  You can set the number of samples and sample rate such that it would generate a partial waveform.  Then you use Get Waveform Components to get the Y values, concat the values, then use Build Waveform to build it back to a waveform.  You will get a back to back output.  In the following example, I used a sine and square wave because a sine and triangle were too close in appearance and you could not readily see the effect.
As Smercurio says, I don't think this is a very good representation of an EKG signal.  That signal has P, QRS, and T waves.  There is no sine wave.  The waves are like triangle waves, so just put DC waveforms (0 amplitude square wave) ahead of and in between triangle waves for P, QRS, and T, followed by DC.
- tbob
Inventor of the WORM Global

Similar Messages

  • Converting square wave to double

    I am trying to pass to square wave signal into math script.  I am assumeing that i have to convert the signal into a double.  Is this possible?  If so how could I convert this signal so it can be passed into math script?
    Thanks,
    Leif

    Which data type does your square wave signal has? If it is a waveform you can get the value as an array of double with the Get Waveform Components primitve.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Convert square wave to saw tooth wave

    Hi all
    i need your help. I have a square wave data in for of an array. Can any one of you suggest me a method to convert this data into saw tooth data. What i mean is that i want to convert a square wave to a saw tooth wave with minimum value 0. Your help is really appriciated. Thanks in advance.
    Chauhan.

    Chauhan,
    Let's continue discussion on your other post here.
    David L.
    Systems Engineering
    National Instruments

  • How to convert square waves to a physical data

    Hi all,
    I have omega ftb-1302 flowmeter sensor which gives a square wave as output.I wired it to DAQ.When i plug in the power supply i saw this image
    When i open the valve it doesn not fluctuate.What am i supposed to do?
    Attachments:
    flowmeter.pdf ‏288 KB
    flowmeter.vi ‏52 KB

    It is hard to say because the terminology is not precise.
    Does the power supply have a ground connection or just + and - outputs? Something needs to connect between the power supply and the DAQ system ground. Analog Input - may not be the same as ground.  Some small current must flow from the signal output line through the DAQ input to DAQ ground to sensor ground to power supply. If you do not define that path by correct wiring, errors or damge to equipment can result.
    What DAQ device are you using? What power supply?
    Lynn

  • I have transefer function like (1/(s^2+s+​5)) and i have a square wave input , i want to use this transfer function with this input to see the output , how can i do that , with example please.

    i need to know also how to represent this transfer function in labview, try to send me example. answer me at my mail

    "st" wrote:
    > answer me at my mail
    give a valid e-mail first, and your name, we don't like to help anonymous
    people
    > try to send me example.
    how much do you pay ?
    > i have transefer function like (1/(s^2+s+5)) and i have a square wave
    > input , i want to use this transfer function with this input to see
    > the output , how can i do that
    First you have to know what you are doing, like an engineer : you have a
    Laplace, continuous time transfer function but LabView handles discrete
    signals only. Use matlab/simulink if you want to simulate continuous time
    systems easily...
    If you definitely want to use LabView, the first step is to discretize your
    continuous-time transfer function, i.e. decide a sampling rate and convert
    it to a "z transfor
    m". Then you can directly use the "IIR Filter.vi" as I
    said earlier.
    Philippe Guglielmetti - www.dynabits.com me at my mail

  • How to avoid jitter in analog output(square wave) generation

    Hi all,
    Iam working with PCI-6723 32 channels analog output,iam generating a square wave,sampling at 100ks/s.
    ican able to generate upto 10kHz square wave.The wave form appears clean when it is below 1000Hz if i crossed 5KHz to 7KHz, iam getting jitter in the output square wave form,i have experimented with the digital filter but still the jitter is persisting,
    since iam using 12 channels for such similar generations so i have fixed the sampling rate.100Ks/s.
    kindly suggest me how to avoid this jitter in high frequency generation.
    OS::WINDOWS 2000
    HARDWARE PCI-6723.
    I/O CB 68
    NIDAQ:7.3
    LABVIEW 7.1
    kindly find the attached file.
    Thanks and Regards
    RAJESH
    Attachments:
    Untitled.vi ‏73 KB

    Hi ALAN,
    Thanks for your reply, well the square appears to be overlapped ie one ON/OFF period another waveform tries to overlap, actually i planned to take a snapshot of my oscilloscope (tetronix) but since its not advanced one ,i have attached the file kindly look into it,you can observe the at some higher frequencies there is lot of difference between rise time and fall time.
    Thanks and Regards
    rajesh
    alan actually iam decorating my front pannel do u have any sample layouts for coloring ,buttons kindy forward me .
    Attachments:
    Doc1.doc ‏56 KB

  • Calculate Square wave Duty Cycle

    Hello everyone,
    I'm acquiring (with USB-6212) a square wave, "100Hz" with variable duty cycle - which can be 20%, 50% or 80% - for matters of decodification; the acquisition frequency is set to 4k. Actually, I said the frequency is 100Hz, because I get a rising edge every 10ms, but the length of the high level is defined by the communication protocol and that is what I called duty cycle (even though this does not match the exact definition of this property)
    Since I need to decode the information contained by the wave, it's necessary for me to be able to tell what the duty cycle is. I've acomplished this so far by taking the derivative of the signal, then calculating peaks and valleys index in the waveform and finally subtracting them, as shown below.
    It works ok almost the whole opeartion, however, the acquisition is not 100% exact. Sometimes I get the signal in the picture A, that is ideal for what I intended.
    Other times, the signal is like B and the derivative amplitude does not cross my threshold, even though there is a rising edge there. I could lower my threshold to 2, for instance, but then I'd get vulnerable to the signal in picture C, which would accuse 2 peaks, instead of just one.
    Anyone have an idea on how to work around this or any other method more reliable than taking the derivative of the signal?
    Solved!
    Go to Solution.

    Well, we can only answer question based on the information supplied!  The LabVIEW Mind Reading Toolkit is still in development.
    Your application is one where parallel loops may be valuable.  In the acquisition loop you read data from the data acquistion device at a rate which optimizes the DAQ perfomance (the >= 2k points you mentioned).  The data is transferred to an analysis loop via a queue. In the anaylsis loop you can put the data into a shift register.  When more data is available from the Acquisition loop, dequeue it and append it to the data in the shift register.  The Duty Cycle section will find two consecutive rising edges and the falling edge between them ( the 10 ms segment).  It calculates the duty cycle for that segment. Then it uses the second of the rising edges as the first rising edge for the next segment.  Repeat until duty cycles have been determined for all segments.
    There are a lot of details which can be imprortant in a process like this. Many of them are dependent on other things you have not specified.  What will be done with the duty cycle values? Is the raw data to be displayed? Saved to file? Discarded after the duty cycle is measured?  How long will the process continue?  How much data can accumulate?
    Lynn

  • PCI-6512 Square Wave

    Hello,
          I am trying to output a square wave from a PCI-6512 board. In my attempts, I have gotten errors about the number of data channels not matching the number of output channels, run into error trying to convert a waveform to an array readable by the DAQ assistant, and its beginning to look like this won't work. I am extremely new to labview/programming and am wondering if what am I attempting to do is even possible. Any help would be appreciated. Thank you.
    John

    Right now I'm just trying to get one channel to output the wave.
    PS Sorry about the front panel, I just noticed what a mess its become. I copied those VI's from a couple different attempts and didnt notice the front.
    Attachments:
    DAQsignal.vi ‏345 KB

  • Measuring Amplitudes of 3 Mixed/Staggered Phase Square Waves

    I'm writing a vi intended to measure the amplitudes of three mixed signals.  These signals are generated by the DAQ already to drive 3 LEDs at 9kHz/ 50% DC combined. 
    I was able to modify an existing example vi to create the LED drive.  I was hoping to find a similar example for the data capture and analysis.  I haven't been successful thus far. 
    Could someone please suggest a good example to get me started?  Please forgive my inexperience as I have been teaching myself Lab View and thus have a very ignorant instructor.
    -Thanks in advance.

    Bad,
    Have you tried the analog data acquisition examples? The sample rate would need to be >18 kHz to meet the Nyquist criterion, but that assumes sinusoidal signals. Since you are talking square waves, you will need to sample quite a bit faster to recover the waveforms. 100 kHz or 250 kHz are probably good starting points if your device will sample that fast.
    Tell us what you have tried and specifically what does not work. Do you get error messages? Does the result look wrong?
    Posting you code with the data you have collected is very useful.
    Lynn

  • FFT on triangular and square waves.

    Hi,
    I have been computing FFTs on a some sinusoidal waves and have been doing fine, gett the right Y axis values in the units Vrms^2.  For example a 10V amplitude (20v peak to peak) wave at 100 htz would give a peak at 100 htz and 49Vrms^2 since the RMS value fo 10 is 7 and 7^2 is 49.  Now when I input a Square wave with the same characteristics I no longer get the same scaling instead getting a peak at a higher y value.  With a triangular wave I get peaks at lower values.  Can anyone explain to me why this is happening?
    Thanks.
    Intern NSWCCD Carderock.

    Actually RMS (Root Mean Square) value of periodic signal f(t) is defined as a square root of squared signal averaged over the period T, mathematically:
    f_rms = sqrt ( aver (f^2) ),
    where aver (f^2) = [integral of f^2 over the period T] / T
    It is easy to show that for pure sine wave f(t) = A*sin(2*pi*t / T), f_rms = A / sqrt(2) ~ 0.707*A – this is well-known result anyone can find in almost every textbook. It is not difficult to calculate exact value of f_rms for square and triangular waves. Results are as follows:
    f_rms (square) = A, where square wave f(t) = A, if 0<t<c*T and f(t) = -A, if c*T<t<T (here 0<c<1 and c=0.5 for 50% duty cycle wave)
    and
    f_rms (triangle) = A / srqt(3) ~ 0.577*A, where I assumed triangle wave that raises from 0 to +A over 0 < t <T/4, goes down to –A over T/4 < t < 3T/4 and returns to ZERO in the last quarter of the period T
    Parseval’s theorem (http://en.wikipedia.org/wiki/Parseval's_theorem) of Fourier analysis states that energy of periodic signal (=integral of f^2 over the period T) must equal to energy of its Fourier transform ( sum of squared amplitude of all harmonics for periodic signal). That’s why Fourier analysis in Labview is capable of producing signal’s RMS value in addition to its spectrum.
    Now, main harmonic of square and triangular waves carries majority of signal energy, but not all of it because of presence of other harmonics. That means that amplitude of main harmonic as reported by Labview will be close to but slightly less than signal’s RMS value. This explains the results you reported in your very first post.

  • Biphasic square wave with interpulsation intervals

    So I'm trying to get my graph to look like the copy and pasted image however I already have knobs and buttons to control duty cycle, amplitude, and frequncy.  Basically I just have created the square wave, I just need a way to insert an interval and display it on a waveform graph since there is no option when simulating the signal.  Thanks!

    It would be helpful to see your code. But if I were doing it I would define the waveform as a repeating series of three time intervals: a high time, a low time and an off time.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Rising edge of square wave

    Hi all,
    I'm wondering how I would go about finding the rising edge of a square wave. I can trigger true when the rising edge of a sine wave occurs but it doesn't work for a square wave. 
    Any ideas would be excellent!

    winterfresh11 wrote:
    So I actually discovered the answer to that question I had, but thank you for your response!
    And what was your answer?  Please share since somebody else might run into the same issue and this thread might be able to help them.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Cp6: .mp3 audio being inadvertantly converted to .wav!

    I am having an inexplicable problem.  I had a WBT crash on me because (I think) the .wav audio files I was using were too much (memory).  So, I asked my IT dept. to get me something that converts .wav files into .mp3 (for smaller files).  They installed "Audacity" to help me.  Audacity does convert the audio into .mp3, and my Cp 6 WBT imports each .mp3 file into each respective slide, but when I go back into each slide that has an .mp3 file installed, each .mp3 audio file is inexplicably converted back to .wav!!!
    If anyone can assist, I would greatly appreciate it.  Thanks.

    Hi there
    Internally the audio files are always converted to WAV as well as MP3. But on the way out to the finished product, only the MP3 is used as it is the smaller and more efficient of the two.
    At least that's how it worked in the past. Perhaps something changed? Or are you just freaking out because you see wav in your project?
    Cheers... Rick

  • How can I output a square wave to control a stepper motor using 7332 controller?

    I have the following system configuration for testing a linear actuator (LA):
    LabView 7.1
    NI FlexMotion 7332 Motion Controller
    NI Flex DMM 4070
    The LA is a stepper motor with Step and Direction of Rotation inputs, as well as some discrete I/O for Power Enable and other functions.
    The LA specification only requires that I send a 50% Duty Cycle square wave signal with frequency less than 300 Hz to it in order to make it step.  The LA has it's own power source.  I only need the 7332 to generate the drive signal and the DOR signal to the LA.  Using some of the example VI's, I can get the LA to work, but I will need to incorporate the functions in to a custom application. 
    How can I weed through the numerous advanced functions the 7332 offers and only generate a DOR signal and a step command at a user-defined frequency.  How do I set up the controller for this?
    Thanks

    Hello,
    All the VIs that you can use to create a pulse train and digital I/O from your motion controller are found in the "Analog & Digital I/O VIs" sub-palette in the "Flex Motion" palette. Use "Load PWM Duty Cycle" and "Configure PWM Output" VIs to create the square wave. Use the "Set I/O Port Direction", "Set I/O Port MOMO", and "Set I/O Port Polarity" VIs to create digital output. I hope you find this information useful. You can learn about the specifics of these VIs and their inputs/outputs in the NI-Motion VI Help.
    Regards,
    Aaron B.
    National Instruments

  • How to generate a high freq square wave on NI-USB 62xx

    Hi,
    I am trying to generate a 50khz square wave with an AO channel on the NI-USB 6212 (rated at 250ks/s AO). I started with the Voltage - Continuous Output.vi example but when i go up toward 50khz square wave (100khz sample rate) the edges of the square wave become rounded. The slew rate for the card is 5V/us and my amplitude is just .5V so i feel like I'm doing something wrong with the task setup.
    I also tried setting continuous samples using the onboard clock for a source and then writing an array [1,-1] but that fails at anything higher than ~8khz. 
    What's the most efficienct/correct way to set up a task like this? Any help appreciated. Thanks.
    Matt

    Hello Matt,
    Right now, I think that shape of the signal that is being output is being controlled by the load on the AO. 
    If there is a very large impedance load attached between AO and ground, the RC time constant of the circuit is going to be very high.  This will result in a large amount of time required to charge and dissipate the voltage.  By increasing the frequency, the amount of time allotted for this is being reduced.  Potentially resulting in the waveform you are seeing.
    Can you please upload a picture of your waveform?
    Can you please try to reduce the load on the AO?  This can be done by disconnecting the current load and attaching a small resistor (50 Ohms should be good).  Does this result in the correct waveform?
    Regards,
    Thomas C.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • MSI 880GM-e35 Wakeing up from sleep by USB mouse or USB keyboard

    I have two 880gm-e35 boards that will not wake up from sleep by Keyboard or mouse. (S3) sleep condition. -They wake up by tapping the power button..ok. On the E-35 boards If I set the (S1) Sleep condition where the fans stay on and power light does n

  • New Value Fields in COPA

    hi All COPA configuration with characteristics and value fields is already transported to QAS. I have created three new Value fileds in DEV and want to transport in QAS?

  • Filling gap in video track

    This is pretty lame but I have forgotten the shortcut to close a gap in the video track by moving all the clips behind it forward. Moving each clip to close the gap is, of course, a pain. Any help?

  • Removing leading spaces in smartforms

    When I print numbers in smartforms, they usually have a bunch of leading spaces, which messes up the formatting. E.g. a CURR 15 field containing 5000 will print as "          5.000,00". I saw the formatting options in the BC470 manual but there are o

  • Server failed during initialization ...(authentification for user denied)

    hi, I'm using weblogic 7.0 server to replace my weblogic 5.0. I've got an error during login to the server: <server failed during initialization Exception: java.lang.securityException: Authentification for user denied..> could you help me and tell me