A sinusoidal signal sampling

Hello world

I'm looking to sample a signal using labview.

I produced a signal using the block "simulate signal" with controls for amplitude, frequency, etc., and have varified it works.

I want to taste this signal at regular intervals and store the data. Can someone explain how to sample a signal in labview?

I watched the white paper next, but he spoke more with the concept of sampling, rather than a tutorial on how to apply it:

http://www.NI.com/white-paper/3016/en/

I also looked at what follows, who even once, did not in fact a tutorial:

http://www.NI.com/Tutorial/3116/en/

I couldn't find anything in my research. If someone can point me in the direction of a tutorial for sampling it would be much appreciated


Tags: NI Software

Similar Questions

  • [FPGA] Problem with the sinusoidal signal generator

    Hello!

    At first I want to apologize for my English is not my mother tongue.

    Hardware and software I use is:

    LabVIEW 8.5

    NEITHER RIO 2.4.1

    NEITHER cRIO-9014 (controller in time real CompactRIO)

    NEITHER cRIO-9104 (chassis and FPGA)

    NEITHER 9264 (16 channels, +-10V, 16-bit voltage analogue output Module)

    I made a very simple FPGA VI: a while loop, generator of sinusoidal signal and a FPGA of e/s node in the loop. I've specified the Gnerator settings by following the path:

    Frequency = 50 Hz
    Amplitude = 1
    Phase shift = 0.00
    Size of the table look-up = 1024
    = 16-bit amplitude resolution

    FPGA clock frequency (40 MHz)

    But the wave of "sine" I got is not what I wanted to get. First of all, its amplitude is 1 V. shouldn't it be coded on 16 bits? If I wanted to get 1V I should have specified Amplitude as a 3277. In addition, 'sine' is not very detailed, it's look like "steps", as many samples vere missing. What I did wrong? I checked the samples and tutorials, I did everything the same way. A I forgot something or not has not specify other parameters?

    Thanks a lot for your help!

    OK, I solved a problem. It's embarrassing to admit, but maybe this will help someone else I blame my inexperience

    The main solution to the problem was changing calibration of calibrated RAW Mode. After that, everythoing works as expected. I had a problem with a sample because I was using a multiplier to control the generated sine wave amplitude. But... She was set to 1 in the sinusoidal signal generator. That was the reason for waveform Gradin. Please, don't laugh too much

    In any case, thank you for an answer! It is now resolved

  • How to vary the tension of a current source continuous using a sinusoidal signal on LabVIEW?

    Hi all!  I have a programmable supply of GW Instek PST - 3202 DC.  I want to test the resolution of temperature based on my power supply fluctuations.  I started to write a VI to do this, but I don't know how to vary the tension the sine wave-shaped.  I found the Wfm sinusoidal function in Signal Processing, but I don't know how to change the '1 d of double picture' which is the "double sink" waveform, which is where I apply the supply voltage waveform.  The VI is attached.

    The value of Format function will not accept a table, put it inside a loop. Use a shift register to add all the values in the table, to the string.

    Lynn

        

  • Problem in the stimulation of the op-amp circuit used to produce sinusoidal signal

    The President complied,

    I'm trying to stimulate these circuits in Multisim. .but I don't get the good output.in oscilloscope.../technotrix oscilloscope.

    On the contarary when I used a bread-Board & checked the result... I was getting sinusoidal output...

    Please help me about the same...

    I guess that stimulate the op-amp circuits is really hard in Multisim. !!

    Please find the attachment.

    NUPSSHAH,

    I took a quick look at these circuits.

    In "wave sine generation.ms12" U1A, you pin 4 (V +) cable to Gnd and PIN 11 cable to + 6V (while all the other operational amplifiers are opposed).  Is - this intentional or your circuit isn't correct?

    Also, these seem to be the variety of resonance (where the change of phase of 180 is important) and can be difficult for any Simulator SPICE simulate, especially if the conditions of marketing and the stage (transfer function) is not perfectly modeled.    I think this might be similar to a situation where in SPICES you need to 'launch' resonant Crystal, that is to say - you'll need to give it an initial energy and eventually it will start to vibrate.   (See here: http://forums.ni.com/t5/Circuit-Design-Suite-Multisim/Crystal-Oscillator/td-p/1109026)

    Usually with a Crystal, the model is relatively simple.   The difficulty with an op amp, is that if you give him too much energy (in order to get to the ramp until the resonance quickly), simulation can go non-linear because of the cutting/saturation and the global simulation at this time is perhaps not reliable.

    Please check your circuit again, but maybe you can try to use as a source of thermal noise + interactive SPDT switch to give it enough starting (and put it out if enough energy is applied)?  Just an idea...  If you see no brake once the source is turned off, the phase is probably off.

    Database-> Signal_Voltage_Sources-> THERMAL_NOISE

    Pat Noonan

    National Instruments

  • Output of a sinusoidal signal to a PC speaker

    Hello

    I am trying to generate a sine wave and a PC speaker output. It works well, but I can hear cuts from her, maybe at the end of the sample size. Is there a way to avoid such a problem. The VI is attached.

    Thank you.

    Thank you. I came across this one and used. It works, but I did not know why the others there is no work.

  • FPGA: Change the sinusoidal signal generator

    The sine wave in the FPGA palette generator, that's what I need to do
    but he can't exit do 'cosine', which is outside of 90 degrees. I need 120
    degrees. To avoid discouraging, I opened the façade on the sine wave
    Express VI generator that turned into a normal sup - vi. I changed the
    a digital constant corresponding to 120 degrees out of phase, and the name was changed
    of the output pin.

    The module will not compile. First mistake was a wire that was a type of variable, the
    Fix suggested to check a box for pre-allocating did not work so I made the table
    the length constant of 1024 (that is, it is supposed to be). Following error was
    that one line of vhdl file was too long (32 k characters for a specification of length 4 k max
    characters).

    Just for grins, I put the original VI Express return with the release of cosine and
    It builds correctly.

    There was a big damper on the modification of the vi. However, I didn't know that
    simple conversion to a subvi and the tweak of a constant value would break.

    Is it possible to get an updated the express vi for this application, or advice on how
    changing the text that is there? The compilation breaks mainly online VHDL
    length associated with the range of 1024 points.

    I can roll my own generator of sinus by using some examples, not a big problem but
    It will cost you some time. Another option might be to run two generators of sinus
    and specify a different phase, but I'm not convinced that over time they
    will be exactly synchronized. Change the Express VI is a much better
    option.

    Thanks in advance,

    Bill

    I discovered the hard way that LabVIEW 2011 has no records. After reviewing various options, I settled on the FIFO. The code presented here works well, but it is not save space on the FPGA to the wire using two generators of sinus with a phase difference in hard on one of them. For now, I'll use two sine generators, if this turns out to be unworkable in practice due to the relationship of phase adrift, then I'll look at it again.

    The frequency and phase of the compensating controls are fixed point numbers formatted in zero whole bit and a 32-bit word. Bed down while the loop is synchronized with the loop timed by the FIFO, FIFO of 18 ticks timeout is two more than the 2.5 MHz in a loop which is a ditch-16. The IF block in the lower part, while the loop cut update control up to 10 KHz, 60 Hz sines more quickly.

    Great experience, thank you for the help.

    Kind regards

    Bill

  • record two signals - sinus 20 kHz in 1 minute - rate of 400 samples

    Hello world

    Is it posible to save two sinusoidal signals in one minute with samples of rates. How I can achavied this. Its a lot of samples. When I tried, programe out with error message saying that "attempted to read samples that are no longer available. Required sample was previously available, but it has since been crushed. "When I increase the number of samples to read there are of the same (outgoing). When I read all the samples it reads to me that some elements ferst save a minute and rest of the signal are declares. In one minute programe will be saved 12000000 samples and I guess for a signal due to 400 kHz rate. To save, I use tdms blocks (open, writing, relatives).

    Whot I'm doing wrong? Please help.

    Marek

    There are a few things I can suggest:

    1 take a look at the following article:

    Why should I get error-200279 of my DAQmx Read VI or the property node?

    2. you must have an architecture of producer/consumer when you're reading in these high sampling frequencies and trying to save all the data in a file. My suspicion is that it may cause the problem that you are facing. You can access the model for the architecture of producer/consumer navingating the file-> New... in LabVIEW. Take a look and let us know if you have any other questions.

  • Simulation of sine signals

    Hello

    I'm trying to simulate sinusoidal signals like speed signals. With amplitudes of Min and Max 5 and 12 V. The beach is 10 Hz to 800 Hz. The output impedance should be 100 ohms and should be rising 800 Hz soft switchable scan @ 7% per second.

    I configured the sliders for the amplitudes of the 5 - 12V, as well as for the frequency range. The wave freezes when the frequency is close to 800 Hz. I configured the sample to 8000Hz rate that is 10 times of 800 Hz still no appropriate waveform.

    I also hurt in soft switchable scanning configuration and the impedance.

    Help, please.

    Thank you.

    Thank you very much Dan_K.

    I love your sinusoidal signal generation method. I would watch the impedance and frequency again sweep. You have been very helpful and informative.

  • error signal nor 9263 9234

    Hello

    I run a very basic test on the cRIO:

    Signal generator > I (NI 9234)

    AO (NOR 9263) > Oscilloscope

    The entrance is 1 kHz and I sent the sampling frequency of the AI to 2.5 k, which should be enough to produce a signal smooth on the scope. It does not work like that (I tried the 51.2 k s/s max and that does not work either)

    I have dc coupling, I export the NI 9234 clock.

    I have attached the code please can anyone help?

    * Just to note that I send a sinusoidal signal of +/-4 volts *.

    Hey,.

    I had a quick look at the VI. Have you tried to move the setting of the rate data outside the while loop? So that define you the flow of data once at the beginning and then to not constantly each iteration?

    Alternatively, you can set a flag that signals the entrance to the MOD3 node to determine if the data looks the same before get out you?

  • Align the two signals and measure the Phase Shift

    Hello

    I do an experiment in which I use the NI USB-6221 DAQ card. The jury is able to make 250 k samples/second. I want to measure two voltages in a circuit and find the phase shift between them at frequencies between 1 and 10000. First I ouputted a wave sinusoidal frequency variable through the Commission and applied to a test circuit. Then I used the Board to measure the two tensions consecutively (thus reducing the maximum sampling frequency at 125 k). I used the signals align VI and measured the two phases and then calculates the phase shift (VI attached in Phase 1). It worked well for the test circuit I built in which the phase shift went way logarithmique.20 degrees ~84.5 degrees and then stabilized. At frequencies above 5 000 Hz phase shift must have remained constant, but it varies more or less 1 degree. When the phase shift is 84.5 degrees, present a degree of variability is not particularly explicit. When I asked my program on the circuit that I really wanted to measure, the phase shift went from-. 5 degrees up to about 1.2 degrees. The change in the values of phase shift at high frequencies (> 3000) was environ.2 degrees. Given the small phase shift, this variation is unacceptable. Now I tried to use a sequence to each blood individually (increase the maximum sampling frequency to 250 k) and then align the two signals and measure the phase of each shift. When I use align it and re - sample Express VI to realign the two signals, I get the message "error 20333 analysis: cannot align two waveforms with dt even if their samples are not clocked in phase." Is it possible to align two signals I describe here? I enclose the new VI as Phase 2

    Matthew,

    I think I have an idea for at least part of the problem.

    I took your program data and deleted stuff DAQ.  I have converted the Signal on the chart control and looked then what was going on with the signal analysis.

    The output of the Waveforms.vi line has two waveforms, like the entry.  However, arrays of Y in the two waveforms are empty!  It does not generate an error. After some head scratching, reading the help files and try things out, that's what I think is happening: the time t0 two input signals are 1,031 seconds apart. Since the wavefoms contains 1,000 seconds of data, there is no overlap and may not align them.

    I changed the t0 on two waveforms are the same, and it lines up.  The number of items in the tables is reduced by one. Then I increased the t0 of 0.1 seconds on the first element. The output had both greater than the entry by dt t0 t0 and the size of the arrays was 224998.  Reversing the t0 two elements shifts the phase in the opposite direction.

    What that tells me, is that you can not reliably align two waveforms which do not overlap.

    I suggest that you go to 2-channel data acquisition and that it accept the reduced sample rate.  You won't get the resolution you want, but you should be able to tell if something important happens.

    You may be able to improve the equivalent resolution by taking multiple steps with a slight phase shift. This is similar to the way that old oscilloscopes of sampling (analog) worked. Take a series of measures with the signal you are currently using.  The make enough average to minimize changes due to noise. Then pass the phase of the signal of excitement to an amount that is smaller than the resolution of phase of sampling rate and repeat the measurements.  Recall that I calculated that for a 5 kHz signal sampled at 125kHz, you get a sample every 14.4 degrees. If shift you the phase of 1 degree (to the point/mathematical simulation), you get a different set of samples for excitement.  They are always separated by 14.4 degrees.  Take another series of measures. Transfer phase another degree and repeat.  As long as your sampling clocks are stable enough so that frequency does not drift significantly (and it shouldn't with your equipment), you should be able to get near resolution of what you need.  The trade-off is that you need to perform more measurements and may need to keep track of the phase shifts between the various measures.

    Lynn

  • Analog output of signal generation custom

    Hello

    I have a VI that generates a signal from the values in an excel worksheet. I'm trying this waveform through an acquisition of output data. I use a box NI USB-6211.

    I copied the exit code for the acquisition of data from other VI that generates a sinusoidal signal coming from an excel worksheet. This program works very well. (attached for reference - Analog Output VI + sinusoidal waveform)

    I have two problems at the moment. First of all, I get error-200560 about waiting until the function, attached.

    Second output amounts only to about 5.5 v instead of 9V specified in the data.

    My VI generate several types of waveform according to selected tests, but I'm trying to get an output DAQ working with the first test, named "disconnection of the battery" work first before implementing it in the other tests so please ignore others for now. To run this battery select VI disconnect under tests select then direct to the attached excel (BD values under 10V) file.

    I hope that I myself have pretty much explained, otherwise please ask for more! I'm new to LabVIEW so your help would be very appreciated.

    Thank you very much

    Parker

    aeParker wrote:

    I've made a few improvements to the VI but I always feel the DAQ 5 Cap output, 5V.

    Dear Parker,

    I guess that this statement is based on the values in the chart show, AO 0.  However, this is not (necessarily) the voltage produced by AO 0, but rather the tension being sampled by AI0.  If you look at the DAQmx create channel for the AI voltage channel, you will see that you have left entries Maximum and Minimum Value unwired, which means that they take their values default to + 5v and - 5v.  This may explain the behavior of cutting that you observe.  Try the + 10 and -10 wiring and see if that solves this problem.

    Bob Schor

  • Can I use 6115 measure DC or low frequency signal

    I use 6115 OR data acquisition if put singnal superior to 100 Hz, the result is very good.

    But if the frequency below 10 Hz, the result is not fair.

    I try MAE and choose the DC coupling mode, it still can not measure DC signal.

    What can I do? or the NI6115 can measure just the DC or the lower frequency signal.

    Thank you

    Hi xsfl,

    Please try the other channel. I wanted to ask, what are the characteristics of your signal? What is a sinusoidal signal, how often, what range of amplitude? Also, have you been able to measure low frequency signals before or is this the first time you try?

    Also, remember that you are above the minimum rate, 20kS/sec, sampling sampling as to the care.

  • several segments of the production of a signal as a signal of undivid

    Hi nice friends.

    I work on a simulation of signal with LabVIEW, all work good and fair execution problem a signal.

    It's a signal sine, its changes in frequency of 15 Hz - 30 kHz smoothly. At first, I thought it would be easy to build a whole and output signal with the DAQmx Timing.vi (use of wave), but things does not seem simple, due to the high frequency (30 kHz), should I do the sampling rate of the wave at least 300 KHz, which again is not the pretty smooth waveform.

    So I was wondering, if it is possible to the waveform of the output in the form of several segments and their output without interruption. Yet I wonder if it is possbile to do with this big (30 kHz) frequency?

    Thank you all for andvance.

    Best regards

    badstone

    Hi GerdW,

    Thanks for the mention me.

    I made a simple diagram as follows

    It is to generate a samples of the series (this is 100 #s) of a sinusoidal signal, before the release period, set the sample as continuous sample clock and frequency of 15 Hz starting, then write it, the material will be guard wirte until the task is stopped or deleted. Now that physical custody write this 100 samples, I change the sampling frequency with the DAQ Timing.vi in a loop, the frequencies change quietly.

    I hope I made clear.

    Best regards

    badstone

  • myRIO sinusoid frequency errors

    Hello

    I have a big problem when generating a sinusoidal signal. I use core FPGA with an Express VI to generate the sinusoidal signal and tuned frequency is not the same result when I measured with an oscilloscope. For example, at 100 Hz out 119Hz; to 1000 Hz is released 1200Hz and 5000Hz was released 5800Hz.

    Please I need help as soon as possible for my graduate studies.

    the entrance to the generator sine takes a + 32.0.  your code did not provide the full 32 bits, and the result was no frequency of course.

    I have attached a version update.  This should work much better.  as I have noted in VI, I do not generally the calculation of the increase of the FPGA code generation.  This calculation is usually in floating-point in RT code.  But if you need it in FPGA, then, it's a way to do.

  • generation of signals DAQ 6133

    Can use of BNC-2110 and DAQ board 6133, I generate a sine signal and the signal sine output?

    Hi WG_23,

    Wondering if you can use your 6133 to generate a sinusoidal signal and connect it to the BNC-2110 to connect it to something else? The 6133 does not have the analog output capabilities, so you will need to do this, use another card.

    Best,

Maybe you are looking for