Sine wave frequency error

Hi! I'm pretty new to labview so any help will be appreciated!
I'm trying to generate a 6-sine wave pulse using the attached generating and detecting vi. It all looks good, however, the frequency which I want the pulse to be generated ain't quite right no matter how I tweek it. For example, I keyed in the rate of generating pulse to be 1MHz in this case, but the detected signal is only 1 kHz (period = 0.001s). There should be no loss in this case. Other frequencies keyed in are also reduce by a thousand times. I think it is due to my Fs=1000 and #s=1000, because if i change my Fs to be 100 and #s=100, the detected frequency will be reduced by 100 times only. But if I reduce it, the resolution of my signal will be poor and I cant reduce it below 50 for a clear signal. Is there any way I can get the signal generated to be that which I typed in? Help!
Thanks!
Attachments:
detect.jpg ‏48 KB
generate.jpg ‏29 KB
graph.jpg ‏118 KB

Hi, I am using PXI-8331 with analog output PXI-6733 and analog input
PXI-6133. I am generating voltage signals and collecting voltage
signals as well.
The problem I have is that when I
intend to generate a 100kHz, 4 sine wave in a hanning window pulse, the
received signal tells me that the signal generated was actually only
100Hz (reduced by 1000 times) for Fs and #s of 1000, and it will be
1000Hz (reduced by 100 times)  for Fs and #s of 100. What I hope to
achieve is for the detected signal to show me that the actuated signal
is indeed that which is keyed in. I am currently using DAQ assistant to
control the frequency of my windowed sine wave. Is there any other way
to go around doing it?
On a side note, yes, I understand
Nyquist theorem. I tried using 10kHz generating signal and 1MHz
sampling frequency (100 times difference) for signal detection, but the
results is exactly the same as that received using 10kHz sampling
frequency and thus I believe there should be something I am not getting
quite right about my signal generation since the frequency is always
reduced by Fs times and I can't change its period.
 I have attached the vi I am using. Thanks a lot for your reply.
Attachments:
combining_testing2_6_2_testtest.vi ‏395 KB

Similar Messages

  • How to get, write the sin wave frequency

    hey,
    How can I get the sin wave frequency from sin wave?- on the diagram. Problem is about saved this parametr to the fille. I have just only last one. I would like to have fequency adequate to the Im and Re  (Im, Re: parametrs witch are saved correctly) 
    Best regards,
    Marek

    Your program will not work because you because many of the functions you use must have timing information. And that information is not included by you as programmer. You have just included some functionality without reflecting over what these functions do and what they need as input. A programmer must have attention to details. You can not just throw out some VIs in a happy go lucky style. 
    Much of your problems is caused by the pesky dynamic data type. This is something that NI have glued ontop of Labview using very cheap glue. The whole concept is just flimflam and you should avoid using it.
    I can see you are a beginner. And that is OK we have all been there sometime. A very powerful function in Labview is the online help option. Then you start a new Labview session go to help in the toolbar. Then select "show Context Help" (ctrl+h). Then in doubt use the "detailed help option" in the online help window.
    I have included something to push you in the correct direction. As you can see many of red dots at the connector panes is gone. That is a good sign. Post again if you have more problems
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    some help.vi ‏11 KB

  • Sine wave frequency problem

    hello
    i have some part of my program that is not working well.
    the idea is to sample a 2V sine wave of various frequency and record down the max and min values
    by right i should get around +2 and -2 for my max and min values
    however at frequencies multiple of 5(5k,10k,15k...) i get a reading of 0.0628215 for my max and -0.0628215 for my min.all other frequencies have no such problem.
    i tried changing the sampling time and rate but i still get a close to 0 result for frequencies at multiples of 5.
    may i know what causes the problem and how can i resolve this?

    Hi
    It may sound silly - but do you acquire data fast enough?
    Just have a look at the Nyquist Theorem.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Creating and controlling a sine wave

    I am a TA for Control Systems & Instrumentation at Texas State University. As the assistant I am required to assist students in their homeworks and projects. I have encountered a problem in assisting the students. How do I create a Sine Wave wit ha sampling frequency of 200 Hz? Obtain the power spectrum of the signal and change the sine wave frequency to 25 Hz. Determine if the resulting frequency is about the Nyquist frequency. Then increase the sine wave to 125 Hz and compare to the Nyquist frequency again.

    There is an example shipped with LabVIEW 2009 called "Resampling a Waveform (continuous).vi" I think this vi will demonstrate what you are trying to do. Change the sine wave frequency using the frequency control in the Test Signals (A) box and change the sampling frequency by updating the output rate control in the Output timing box. You will then see the original waveform spectrum at the original sampling rate (Fs) and the re-sampled spectrum will be shown in red so you can see the shift.
    Systems Test Engineer
    Certified LabVIEW Architect (CLA)

  • How can I calculate the frequency of a 2-4Hz three phase sine wave in 50msec?

    I want to calculate the frequency of a sine wave using either all three phases or just one, but I want to know the frequency after 50 msec, I don't want to have to wait for a full period.

    I have a mathematically sound suggestion but I do not know how well it will work in application. Most period measurements measure the time between a full period or several periods to eliminate the error introduced by the measuring device. Essentially the device error is made insignificant.
    Mathematically you can do much more but there is a tradeoff between recording less information and knowing (or assuming) some values. For instance, if one knew the amplitude and could calculate the derivative of the signal, one could calculate the frequency. A sine wave can be represented by the function: A sin (BX)=C , where A is the amplitude, B is the frequency, C is the present measured value. If the equation is solved for X, we get: X=(sin^(-1)(C/A))/B. The d
    erivative of the first equation is AB cos(BX)=C. If the equation for X is now substituted into the second equation, we get, AB cos(B (sin^(-1)(C/A))/B)=C. Solving for B we get B=C/(A cos(sin^(-1)(C/A))). Remember, we already know A and C, so we are done.
    Practically every step and assumption in the above argument introduces possible error which will affect the accuracy of the frequency. Unfortunately it is a trade off and that is why at least a whole period needs to be measured to get an accurate frequency.
    Jeremy Braden
    National Instruments

  • How to dynamically adjust Frequency, Phase and Amplitude for a Generated Sine Wave in C/C++?

    Hi,
    I wonder if anybody know how to dynamically adjust Frequency, Phase and Amplitude for a Generated Sine Wave in C/C++? This is a part of my project: I need to dynamically generate a sine wave voltage signal by some calculation using the data from a simultaneous analog input and another signal.
    Your help will be appreciated so much!
    Marlon

    Hello Marlon,
    Here is an example of changing frequency and ampliude for an E-series device in Labwindows/CVI. The programming should be similar in C for your S-Series device. As is says on the linked webpage above, this process is going to be very processor intensive since you will continually be creating a buffer.
    Nicholas C
    National Instruments
    Applications Engineering

  • Conditional error for comparison of sine waves

    Hello Everyone,
    i am making a small program that is for some changes in sine waves and later i have to compare to set my condition. i cannot get through this error. i actually want out put as bolean so my condition for loop is attached with this output. Anybody please help
    Regards
    Qasim
    Solved!
    Go to Solution.
    Attachments:
    error.png ‏29 KB
    test.vi ‏63 KB

    Have a look at the examples of the mixed signal graph. That indicator 'eats' nearly everything... wfrms together with XY data with ...
    However I didn't get the intensity graph included
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
    Attachments:
    mixedsig.vi ‏12 KB

  • Measuring Superimposed Frequencies on a Sine Wave

    Hi,
    Just looking for advise on the best way to measure superimposed frequencies on my raw data. The raw data (voltage versus time) is ultimately a noisy sine wave with a frequency of 1Hz. I need to determine where the noise is coming from, i.e. is it vibrational, electrical or surrounding noise, hence requiring the frequency of the noise if possible.
    Any advise on the best way of filtering the data would be appreciated. Currently I am using a butterworth filter with a cutoff setting of 1.5Hz. The original data was sampled at 1.5KHz so the noise was measured and so could be filtered during postprocessing.
    Also when filtering I don't want to loose important data i.e. sudden peaks or drops.
    Regards,
    John.

    John,
    Have you tried spectrum analysis of your data? That will give you the frequency content of the signal plus noise. One peak will be at the 1 Hz sine signal and other peaks will correspond with the supeimposed signals. With a 1.5 kHz sampling rate you would get information on frequency content up to the Nyquist frequency of 750 Hz. A peak at 50 or 60 Hz will likely be power line frequency interference. Gears, bearings, and motor armature slots produce characteristic frequencies which are related to the rotational speed.
    Lynn

  • Unable to read the frequency from this output sine wave of amplitude VS time

    my programe reads through a labjack programe works up until the LJ stream graph process reads to "scaled data v's seconds" graph.where it outputs a sine wave (amplitude vs time)
    for some reason the "freq. amp." analyser won't read the frequency correctly. when i run the programme it outputs a frequency of zero.
    note: the amplitude is reading correctly
    see both programmes attached..................
    Attachments:
    problem.vi ‏77 KB
    LJstream_graph_processing.vi ‏46 KB

    I don't really see the utility of this VI, however, the variable "scan rate", of the "LJstream graph processing", it's an arbitrary value, why?...
    What is the idea with these VIs?, tell me more, please.
    Bye.

  • How do i measure the frequency of a sine wave using a field point counter module

    I need to measure the frequency of the sine wave using field point. is it possible and if yes how. do i need to convert the sine wave signal to square wave. Please let me know.

    It probably would be easiest to convert the sine wave to a square wave with a simple external circuit and then use a counter module to measure the frequency. There is a shipping example in LabVIEW that shows how to measure frequency with a FieldPoint Counter module.
    JRA

  • Best fit lines for loops and sine waves

    I am trying to find a best fit line that will work for sine waves and loops (hysteresis loops). I can get the sine wave just fine, but when I switch to a hysteresis it just puts a line across the middle (I assume because of the 2 y values for every x). I am doing data acquisition that will take in both forms and graph them. I tried a polynomial fit and it doesn't work at least the way I implemented it and I tried a few others but it looks like they are all function based. Also, my y values are coming out of a Bessel filter. I don't think this would be affecting anything but I thought I would put it in here incase it does.
    Did I miss one that I haven't tried that works for my application?
    Thanks
    Patrick

    RiversDaddy wrote:
    ... currently I am doing it by looping and reducing the error towards zero to fit the amplitude and phase. (I know the frequency).  If this is what you are looking to do then I will help, or should I be doing things differently? All of the functions I have found to filter or extract tones seem to introduce a larger frequency of phase error than i get using this method, but am I missing something?
    "looping" is a bit vague. What is the actual algorithm to find better estimates (e.g. levenberg marquardt, etc.)
    What problems did you have with extract single tone. Can you show some data where the results from it are not good?
    LabVIEW Champion . Do more with less code and in less time .

  • Generating sine wave

    Hello,
    I have a small labview problem.
    I want to generate a sine wave pulse with labview and send this to a pc oscilloscope by using my soundcard.
    First VI I made creates a sine wave and sends it to the pc oscilloscope. Works perfectly.
    But now i want to create a sine wave with only one period (second VI). Problem is then that the VI blocks if i want a high frequency (I need 10kHz)
    So the VI works on low frequencies but gives this error with higher frequency:
    "the sound driver or card does not support the desired operation."
    Can somebody give a solution for my second VI (creating sine with one period on 10kHz).?
    Thanks in advance!
    Jelle
    Solved!
    Go to Solution.
    Attachments:
    GeneratingSineWaveManyPeriods.vi ‏59 KB
    GeneratingSineWave1period.vi ‏37 KB

    Hello Benje,
    The problem/difference you're seeing is indeed in the coding and also in the sound card.
    In the "working" example you're using the Simulate Signal VI with the following settings:
    - 44100 samples per second (sample rate)
    - Number of samples 10000 (samples per generation cycle)
    In the non working example you specify:
    - sample rate = 1000*"Frequency Control value". This sampling info should be fixed to (for example) 441000 Hz.
    - Number of samples 1000 (samples per generation cycle)
    As a sidenote:
    Is there any reason why you used different functions to generate similar signals in the 2 VI's?
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • How can I get 'sync' signals for sine wave out? [FPGA USB 7856R]

    Hello,
    I'm Sean Ahn using NI 7856R, USB FPGA with LabVIEW 2014.
    I'm trying to make 'sync' signals for sine wave of adjustable frequency, like general function generator's sync out.
    I use sine waves whose frequency is feedback-congtrolled between 25~30 kHz and need sync signals of square wave.
    Like [1] below, when I try resettng two wavefom-generators, sine and sync signals are not perfectly synchronized.
    And everytime I adjust sine's frequency, the phase difference between sine and sync changes arbitrarily 
    In case of [2] using 'zero-crossing detector', I have severe jitter of sync signals not suitable as 'sync' signals for other parts.
    Please, give me some help.
    Thanks in advance
    Sean Ahn
    [1] Reseting two waveform generators
    [2] Zero-crossing detect

    Here’s my issue.  When I try to move any data between my PC and the iPad2 I receive an error message that states that “the [sync] session could not be started with the ipad, Please disconnect and reconnect the iPad and try again”
    I have tried again and again by various methods etc .  and all I get is the same message when I attempt to sync, backup or update the iPad. 
    I have tried the following AND FAILED:
    Deselect all Apps, Music etc in iTunes, then attempt to sync
    Disable and enable the iPad in device manager and restart itunes and try to sync again
    Disable and enable Apple Mobile Device Services and sync/backup/update
    Run iTunes as Administrator
    Reboot all devices (iPad buy pressing two buttons at once)
    Turn off all security and reboot and sync
    Connect directly to internet without a router
    Tried to sync with all wireless turned off and in airplane mode
    Running iTunes Diagnostics...... nothing all test passes
    Changing USB ports and cables
    Removing my SIM card and rebooting and trying to syc
    Trying to sync via wifi only
    Turning off all icloud services
    Uninstalling all Apple Software and reinstalling again
    I am syncing to a 64bit  PC running Win 7 Premium with all the latest updates, all firewalls off. WiFi and direct connect ethernet to Internet service with and without router.
    I am trying to Sync an iPAD 2 running iOS version 5.1.1 (9B206)
    I am trying to update from iOS 5.11 to 6.01 by using Itunes 11.0.0.16.3 in a USB or directly through the iPad via wifi.
    Please help as everything I have tried has failed.

  • Measuring Sine wave deformation

    Hi Folks.
    I am trying to measure the signal deformation coming from a scope. Its a typical sine wave that distorts as the input increases (shown in the attachments). I was initially just going to subtract a known signal from the recieved signal to give the difference. The point by point error is to big for this. I am also trying to determine the slope over time and the rapid change of slope would indicate the point. However point by point calculation of the slope gives too much error to. Is it possible to generate accurate slopes or is there a function that determines if a signal is non-sinusoidal??
    Thanks,
    Mark.
    Solved!
    Go to Solution.
    Attachments:
    Sine1.jpg ‏26 KB
    Sine2.jpg ‏26 KB
    Sine3.jpg ‏26 KB

    For a quick visual check you can use the tone detection vi and export the residual signal, maybe the rms value of the residual is a nice value (THDN)
    Measures of deformation of a periodic signal are (usually) often done in the frequency domain and called harmonic distortion. There are also vis that already can do that for you.  (SINAD) . The THD level is usually used.   Look under signal procesing - wfrm measure
    Your traces look like a 1g steel ball accelerometer calibration to me.  
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Generate n sine waves and add them together

    Hi
    I'm new to Labview and I want to generate n number of sine waves and add them together to form one signal that can be out put through a DAQ card. Each successive wave frequency will be the multiple of a base wave all will be the same amplitude.
    This to me suggested a For loop with a sig generator  and a passback in it but when I tried this it threw an error because the dt were different.
    Any help will be appreciated.
    Thanks

    Show us what you did.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Tooltip appears differently in Acrobat 7 vs. Acrobat 9

    I created tooltips for my form fields in Acrobat 9 (Livecycle Designer 8.2) and they appeared as nice boxes of text on mouse over.  When my user pulled up the form in Acrobat 7 the tooltip was all in one line across the screen.  Any ideas on how to s

  • Os x not installing for me

    I bought 4yrs ago a imac g3 and it had Panther installed i love this old mac you cant kill it. Anyway I got a powerbook g3 from my friend and it had os8 i updated it to os9.2.x and want osx. now come the fun part Apple said osx 10.3 is supported for

  • Downloading a movie from the iTunes Store after it has been deleted

    I accidentally deleted a purchased movie I was downloading from the iTunes Store. Now when I click on the movie by going to Purchased and clicking on the movie I don't get a button that lets me download the movie from iCloud; instead, there is a butt

  • Scheduling ASE Data and Log Backup

    Hi, Trying to schedule ASE database backup using Sybase control center but it seems SCC version does not have Task management tab in Administration Console. Is it a configuration which is missing or is the version of SCC for which it is not enabled.

  • CS4ServiceManager How to remove?

    I just installed Lion a couple days ago and now everytime I restart I get the following dialog box and somehow Software Update is launched but when I hit OK in the db, the db quits and so does Software Update. What is this and why is it happening and