Generating a true sine wave

For this program, I need to generate a sine wave if a variable is true on the analog output.  That's what this part of the program looks like http://i.imgur.com/JrZFOZY.png

Sine wave: http://i.imgur.com/dfYtoL6.png

Data acquisition: http://i.imgur.com/66YLwbH.png

It'll work a little, but then I get this error: http://i.imgur.com/uL1Fm5M.png

Does anyone have a suggestion as to what could be the problem?  Specifically, this triggers when TRUE is passed in a second time - it will do very well for the first REAL entry, but then when we become TRUE being re-entered it does not work.

In the acquisition of data, try to change the Mode of generation of finite samples.

Tags: NI Software

Similar Questions

  • Continuously generate a sine wave

    Is there a way to generate a waveform in Labview without user input to stop it permanently?  All shipping LV examples require the user to press a button to stop.  I need to automate that in Teststand.

    I want to:

    Step 1 - generate a sine wave continuously

    Step 2 - make a measure

    Step 3-stop the waveform started step 1

    Thank you

    Never mind... I thought about it.

  • Simulate the sine wave using LabVIEW FPGA with NOR-myRIO and display in real time

    Hello

    I'm relatively new to LabVIEW FPGA. I am trying to test (and later apply) controllers high speed on myRIO.

    At this point, I'm trying to simulate the sine wave from 1 to 10 kHz using Sinewave generator VI express. I also intend to display the sine wave on the time real (RT) using FIFO. However, I had a bit of trouble to understaing various synchronization parameters.

    1. how to encode information about the sampling frequency generating sine wave? (The side FPGA vi requires only the frequency of the signal and possibly phase and does not rate update lines)

    2. how to estimate the number of items in a FIFO? (that is, the relationship between the rate of updates to loop (RT), the signal frequency, sampling frequency and the number of items in the FIFO)

    It would be great if we could share a very simple program (side host and target) that did something similar.

    Thank you

    MILIN

    Milot,

    I think the problem is the type of data in your FIFO. Your FIFO is configured to use a data type of I16. The problem is the number, it displays only ever will be-1, 0 or 1. To resolve this problem, you must send the sine wave as a fixed point data and convert it to a double on the side of the RT. This should significantly improve your resolution.

  • Ideas on how to create a sine wave between 0 and 10 V with NI 5412?

    Hello

    I tried to create a sine wave from 0 to 10 volts on a 5412 OR. I have 2 problems and I have a question:

    (1) I can't generate a waveform with lag, even when using the examples of NEITHER.

    (2) the value of the offset, that I can set the camera is of +/-25% range of amplitudes. Do I have to create an arbitrary waveform myself?

    (3) in the brochure it says I can get 12 v peak-to-peak. Does this mean that it is between-6 and 6, or it is between 0 and 12?

    I would appreciate it if I could see an example.

    Thank you very much.

    Hi, several notes:

    (1) the peak to peak voltage is 12V. For example, it can operate between 0 - 12V.

    (2) the shift of 25% limit is for a given wave. That means assuming that it will create a wave, it cannot compensate for 25% of the beach. The solution is to create an arbitrary wave (e.g. a sine between 0 and 10 V) and the function generator to create rather than attempt to compensate for a sine wave.

    Thanks for the help though.

  • cwdsp. Sine wave is where the sampling rate?

    Hello

    According to the method above (CWDSP. Sine wave), the parameters are the following:

    (n, a, f, Phase)

    n As Variant - [Input] number of samples to generate.
    Amp as Variant - [Input] Amplitude of the signal that results.
    f As Variant - [Input] frequency of the signal resulting in standardized units of cycles/sample.
    The phase as a Variant - initial phase [output] in degrees of the generated signal. Output, the Phase is the phase of the next portion of the signal. Use this setting in the next call to this function to simulate a generator of continuous functions.

    We are not lack of sampling frequency?

    example:

    I want to generate the next sine-

    FREQ = 1 kHz

    sampling frequency = 10 kHz

    (Number of samples) block size = 1024

    Amp = 1

    How will you use this function for this signal?

    I think (but I'm not sure of it...) is: CWDSP. SineWave (1024, 1, 1/10, 0)

    There is an example: "power spectrum".  In this example, they do not mention the sampling frequency and the signal is generated as follows:

    CWDSP. SineWave (1024, 1, 0, 1000/1024)

    No mention of the sampling frequency.

    Thank you

    Hey Rafi,

    Both of your assertions are correct.  The frequency of de.1Hz at no time is the equivalent of what you would get from sampling equipment of a wave of 10 kHz to 1000 s/s; in both cases, you will see a cycle of the wave every 10 samples, as you are pointing out.

  • output signals of the rectangle a PEAK sine wave conversion

    Hello

    I have a question on the treatment of a PIC16F84 output signals. It seems that the simulation of Multisim does not work properly - but before I blame Multisim, I ask the community NOR or software engineers or a solution. Because I'm German, you are invited to continue this thread in German if it is allowed by the rules of the forum. If you need additional information to analyze my problem, I'll be happy to provide.

    The circuit itself has to convert "composition by pulse" signals "tone" (DTMF tones). So you can get old, classic phones work on new devices that do not support the "composition of pulse" more.

    The circuit is powered by the analog telephone line current loop line. The PIC is provided by a rudimentary voltage regulation and count pulse signals (voltage failures / power interruption on the telephone line). After that the captain means the series of impulses in their equal number (e.g. 3 pulses = number 3). The captain gives finally two signals with different frequencies to generate a DTMF tone (e.g. number 3 here is 697 and 1477Hz). As you can see in my PDF file attached, it works very well.

    Now I have to convert the rectangle wave given by the captain to an at least similar to a sine wave form - otherwise the device that receives the DTMF tones won't understand them.

    So I connected a low-pass filter at the output of the PIC. Now, expect the rectangle signal to be smooth in a way as the 'e-function' will (loading / discharging a capacitor through a resistor). But the results are very far from that - as you can see I have very strange curves.

    When I implemented a frequency generator with the same output signal as the PEAK and the low pass filter even I get curves as expected.

    So we can say that the output of the PIC works like a frequency generator in my circuit. But why does the filter not behave as it should?

    I've tried a lot of different values for the parameters of my RC-filter and simulation - this does not solve the problem.

    It would be nice if someone has any idea how to solve this problem.

    Thank you.

    The output impedance of the PEAK may be too high. May be that my car 50 output? Try scaling of impedance of the filter.  Do the 10000 ohms resistance and capacitor 10 nF.

    Lynn

  • SINAD SNR NI 6733 sine wave

    Hello world

    This question is perhaps a bit too much, because I have seen already too many messages on SNR and SINAD in this forum. But honestly, I've been looking for all threads and I couldn't find what I really need, that's why I am posting this however.

    My question is, how do I get the real analog sine wave SINAD or SNR output PXI-6733. I tried to look at example SINAD base measureand also niScope EX Fetch to always use the PXI-5105, but I don't think I get the real value of SINAD just by simply using the block measure SINAD. I get only 38dB SINAD using the sampling frequency of 1 MHz and 100 k points, by extraction. IM geneating 10 kHz sine wave with PXI-6733 for example Cont Gen Wm-Int Clk.vi voltage.

    Any idea what I miss here?

    Hi Mystogan,

    If I understand you correct, generate you a sine with the PXI-6733 and measure this return signal

    with the PXI-5105 and the expected value are reached because you only get measures

    round about 50 DB?

    The problem might be that in the manual of the PXI-5105 page 7 the SINAD of the device is between 50-62 db.

    If you want to get the best result, you must use a map better as the PXI-5122 page 9 the beach is here

    89 - 102 db.

  • Measurement of deformation of the sine wave

    Hi people.

    I'm trying to measure the deformation of the signal coming from a range. Its a sine wave typical that distorts the increase of entry (see attachments). I was initially just to subtract a known since the signal signal to give the difference. The fault point by point is great for this. I also try to figure out the slope over time and rapid changes of the slope would indicate the point. However, point-by-point calculation of the slope gives too much error. Is it possible to generate accurate slopes or y at - it a function that determines if a signal is not sinusoidal?

    Thank you

    Select this option.

    For a quick visual check, you can use vi tone detection and the export of the residual signal, maybe the effective value of the residues is a nice value (THDN)

    Measures of deformation of a periodic signal (in general) often made in the frequency domain and called harmonic distortion. Also, there are screws that can already do it for you.  (SINAD). The level of DHT is usually used.   See signal processing - wfrm measure

    Your traces resemble a calibration of accelerometer ball steel 1 g for me.

  • Why my output signal is produced waves triangle when I want the sine waves

    in labview I use the daq assistant to create an output voltage signal to create a sine wave. When I connect it to the opscilloscope, it reads the triangle waves. is someone can you please tell me why this is.

    9172 is a chassis so I need to know the module you use, too. You should try the example:

    %ProgramFiles%\National Instruments\LabVIEW 2012\examples\DAQmx\Analog Output\Voltage - Output.vi continues

    It shows you how to create a waveform to generate, you could use this piece and feed in your daq assistant.

  • Is it possible to change the sine wave 'exit' a simulation device?

    I work on a LV collection and analysis VI in LabView that interfaces with a CDAQ-9178 loaded with 9215 modules/a. chassis.  In the Measurement & Automation Explorer, I was able to set up simulated devices that work with my code and I get the sinewave / 5 (?) standard signal noise %.

    However, to really test my application, I need a slightly different sine wave with high frequency (1-10 Hz vs the)<1hz sent="" by="" the="" simulated="" device). ="" is="" there="" anyway="" to="" modify="" or="" get="" the="" simulated="" device="" to="" output="" a="" different="" wave? ="" if="" not, ="" are="" there="" any="" other="" simple="" ways="" to="" simulate="" the="" device? ="" i="" could="" write="" another="" vi="" to="" send="" out="" a="" sinewave="" but="" was="" looking="" for="" a="" more="" obvious="" or="" simpler="" solution="">

    Thank you

    # You need to do is call an of the generating functions of waveform instead of the DAQmx Read. Place inside a case, the declaration or the conditional structure disable is fairly simple.

  • Sine wave

    Hello

    I am trying to generate a sum of sines with sine wave function and calculate the fft to see if I can recover the amplitude of each harmonic. This goal, eventually, get a real signal and the calculation of TFF. But at the moment I am testing the code on virtual signals (square, triangle, etc.).

    However, I can't draw the sum of 3 sines. I n 't understand how can I generate a first sinus (fundamental), and then of sines with a multiple frequency of the fundamental. (f, 3f and 5f).

    I tried this:

    SineWave (512,5,1/512,&Ph1,sine1);

    PlotWaveform(...,...,sine1,512,...,1.0,0.0,0.0,1,...,...,...,1,...);

    But nothing shows up except for a constant line.

    To summarize: I think I have nothing understood at all on works of the sine function, espacially concerning the frequency, I have to spend.

    Thanks a lot if you can help me

    Kind regards

    _trent_

    Ah. This was one of those simple mistakes that takes forever to find. For the frequency parameter you have specified "1/512", but since it is the division of integers, it takes the value 0. Instead do "1.0/512.

  • write to sine wave DAQ AO map

    Hi all

    I use a card OR-DAQ 6009, and I'm trying to generate a sine wave of LABVIEW 8.5 and then go out to the analog output of the data acquisition card.

    The code I wrote was pretty simple. Generate a sine wave with the help of "create an analog signal" and then connect the sine function «writing» DAQmx. The output of the 'writing' goes into the task of "DAQ Assistant" outside of the loop.

    But I get the following error message:

    Error-200077 occurred to the property Node DAQmx Timing (arg 1) DAQmx calendar (sample clock)

    Property: SampTimingType
    You asked: sample clock
    You can select: on request

    Parameters with respect to the timing of the sample in each of the 3 components are:

    Creat analog signal: sampling frequency: 10K block size (samples): 100

    Writing: Analog, single channel, several samples, waveform

    DAQ Assistant: sync settings:

    Generationg mode: samples of N

    Writing samples: 100

    Rate (Hz): 10K

    Any help will be appreciated.

    Thank you.

    Colin

    You see this error because the 6009 does not support timed by the material outputs analog.  Have you looked at the data sheet of the device?  He does not appear.  Here it is:

    Note that the listed maximum rate is 150 s/s, and it is specified as timed software.

    So what you're trying to do is not possible with the 6009.  You will need a 6221 or something similar.  Make sure that any advice you choose supports analog output clocked by material at a fast enough pace for what you're trying to do.

    Edit: I see that Dennis beat me to it!

  • sine wave vi

    I would like to illustrate the effects of the differences on the amplitude, frequency and phase between two sine waves. I already used the sinus function and works well without phase variations. I tried to use the sine wave as planned in the signal generation VI vi, but I can't find a way to make it work. I tried to use a loop for change the entrance of samples, but does not work. I don't want to use the express vi.

    Anyone out there an idea to share? Thank in advance!

    Ricardo

    Have you looked carefully at the example, that I told you about earlier? You can find examples in LabVIEW by going to help > find examples.

    This example uses the VI of sinusoidal waveform to generate sine waves. Just look at the chart of most likely down. Look at the entries to the function and you will see how the sine waves you want do like VI.

  • How to measure the difference in time between the passage by zero of a sine wave and the rise time of a pulse on a same graphic?

    I have a sine wave of 50 Hz and a pulse of the signal on the same chart. The difference in phase between the two is between 0-90 degrees.

    Now I need to calculate the time difference between (when the sinusoidal wave passes through zero volts) and (when the pulse increases). The frequency will remain about even for the two signals.

    The request is for a three-phase generator. In simple terms, when the difference in time between the passage to zero of the sine wave and pulse increases increases, it means that the load on the generator has increased.

    I am a novice user of LabView (version 9, 2009), maybe it's a very simple problem but I was pulling on my hair for the past few days and couldn't understand anything. Any help would be greatly appreciated. I use DAQ USB-6008 to measure these tensions and the impulse of the generator and a sensor

    I have attached a jpg file (a graphic that I just did with excel to explain). The time 't' is what I'm trying to measure

    See you soon

    Zdzislaw

    Awais.h,

    For problems of this kind I recommend start writing the granular steps you would take to manually fix this problem.  You can't say LabVIEW (or any programming language) If you can't succinctly describe the solution to your problem.

    The I want to address this problem is to:

    1. find all the zero crossing points and edges on the rise
    2. for every rising edge find the difference between the timestamp and previous passage by zero

    Here is an implementation of this algorithm LabVIEW:

  • sine wave generation

    Hello

    I have a problem of small labview.

    I want to generate a sinusoidal pulse with labview and send it to a pc oscilloscope using my sound card.

    I did first VI creates a sine wave and sends it to the pc oscilloscope. Works perfectly.

    But now I want to create a sine wave with a single period (second VI). Problem is while the VI blocks if I want a high frequency (I need 10 kHz)

    So the VI operates on frequencies low but gives this error with a higher frequency:

    "the audio driver or the card does not support the desired operation."

    Can someone give a solution for my second VI (creation of sinus with a period on 10 kHz). ?

    Thanks in advance!

    Jelle

    Hello Benje,

    The problem / the difference you see is indeed in coding and also in the sound card.

    In the example of 'work' you use the VI of Signal to simulate with the following parameters:

    -44100 samples per second (sampling frequency)

    -Number of samples 10000 (samples per cycle of generation)

    In the non-functional example, you specify:

    - sampling rate = 1000 * 'Value of frequency control'. This info of sampling should be fixed (for example) to 441000 Hz.

    -Number of samples 1000 (samples per cycle of generation)

    As a sidenote:

    Is there a reason why you used different functions to generate similar signals in the VI 2?

Maybe you are looking for