Sampling sine wave in labview

how to read  the corresponding voltage value for each point on sine wave(each sample)?
please show me the block diagram
thanks,

continued here....
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Sampling sine wave and saving the samples in an array.

    helo..
    I am new to Labview and i need some help regarding sampling the sine wave.
    I have generated the sinewave in labview and now i want to sample it.(do i need an ADC for sampling?) and the samples should be saved in an array.
    I dont know how to do this.
    Please tell me how to do this or post some related examples..
    Thanks in advance 

    All of the functions that generate a sine wave in software do save all of the samples in an array. You just need to know how to get them. Since you did not mention the function you used to create the sine wave, lets assume it's the Express VI Simulate Signal. On the signal output, wire a Convert From Dynamic Data type function and select the default 1d Array of Scalars. Right click on the output of this and select Create Indicator. You now have the array. If you are using Sine Waveform which outputs a waveform data type, just wire up a Get Waveform Components function and select the item 'Y'.
    For learning the basics, please see the free tutorials
    Message Edited by Dennis Knutson on 10-28-2008 08:23 PM
    Attachments:
    Get Y Array.PNG ‏4 KB

  • How can i measure only the valley voltages of a sine wave in labview 7 express evaluation version?

    I am trying to convince my company to send me to purchase labview and send me to classes for labview.
    I am trying to put together a small demo for them using the Labview 7 express evaluatin copy that I recieved.
    What I am wondering is how can filter out everything besides the valley peaks on a sine wave.
    What I am trying to accomplish, is create an example showing that Labview can sameple from a sine wave, read about 5 "valley" points of the wave, evaluate these based on a value that i can define, and signal pass or fail.
    attached is a picture of what i have so far
    Ryan
    LV 7.1
    Attachments:
    progress.bmp ‏3841 KB

    Hi,
    I built a VI using LabVIEW 7.0 that detects the valleys in a sine wave. It uses the 'Peak detector' VI that I believe is available in the evaluation version.
    (Functions palette >> All Functions >> Analyze >> Signal Processing >> Time Domain >> Peak Detector)
    I have attached a VI as well as the screen shots its front panel and block diagram.
    I hope this helps.
    Sincerely,
    Feroz
    Attachments:
    valley_detector_bd.jpg ‏36 KB
    valley_detector_fp.jpg ‏72 KB
    valley_detector.vi ‏29 KB

  • How can I Write a sine wave in an Access-fil​e?

    I measure a sine wave in LabView 6i. How can I write the datas automatically to an Acces-file, at the same time?
    In my program, I managed it with Execute SQL.vi, I change a number in a SQL statement(String) -> after this I push start and then it writes the statement in the Access-file.
    The problem is, it writes only one data per measurement in the file. How can I write all datas in the Access-file and measure the wave at the same time?
    Thanks for help!
    Attachments:
    getwave.vi ‏49 KB

    On the waveform palette, you will find a "to components" vi that you can break out the array of the waveform. You can then, using a for loop write all of the values from the waveform.
    Better yet, there are examples in the database toolkit manual on pages 3-13 to 3-15 that deal with reading arrays (and even has a waveform example).
    Good luck!

  • How to generate 3 phase sine wave to output on ELVIS

    Hi .I need to make a star or delta connected circuit on ELVIS board.2 make this circuit I need 3 wave generator( with 120 phase shift) and one common ground
    and because the ELVIS function generator can only generate one wave I decided to generate countionuos sine wave in Labview.
    Now I can generate 2 continuis sine wave in labview and output them on the analog outputs of ELVIS.Ao-0 and A0-1
    but I dont know what to do for the third signal.the elvis board just has 2 analouge output and when I use  Ao-0 and A0-1 I cant use ELVIS function generator after that.so would u please help me on this problem.how can I output 3 contious sine wave in Elvis.I have attached my VI to this post
    Attachments:
    new.vi ‏38 KB

    Hi, I am also having some problem in generating two signals from two AO. Could you please tell me how to generate two different signals from two AO. I have attached vi which generate square wave from one AO 0. I need the inverted signal in AO 1. 
    Attachments:
    Pulse Width Modulation.vi ‏48 KB

  • How to get a pulse output at the start of a sine wave which is the input?

    i am working on a comparator that generates a pulse for the positive cycle of a sine wave.but i want to get a pulse of shorter duration at the start of a sine wave (using labview) please suggest

    Hello;
    You can synchronize one of the general purpose counters your board have to the analog input operation. By doing that, you can have your analog input starting the counter operation which will generate the desired pulse. Moreover, you can even specify the delay and width of that pulse. For more information on how to synchronize DAQ operations you can refer to an Application Note named "Advanced Synchronization Techniques for Data Acquisition" which can be found at our web site.
    Hope this helps.
    Filipe

  • How to get the sine wave sample of the input and output in the same time?

    I discovered that the samples were acquired did not in the same time in my vi.Could you tell me how to get the sine wave sample of the input and output in the same time?
    Output:9263;
    Input:9201
    Attachments:
    singal requency.vi ‏104 KB

    Hello Yun_Zhu,
    Your VI looks like you started from an example, and you are on the right track. 
    To clarify are you trying to synchronize the input and the output waveforms?  If you you will need to share a time base and a start trigger.  Check out the synchronization examples from LabVIEW
    Anthony F.
    Product Marketing Engineer
    National Instruments
    Attachments:
    HIODAQmxSyncMultiDev.png ‏70 KB

  • LabVIEW FPGA Sine Wave Generator Reset Input Behavior

    I would like to know what the output from the Sine Wave Generator express VI is while the reset input is true, and what happens to the output immediately after the reset input is set false.
    I need to generate a regular sequence of positive half-cycles of a sine wave, with an arbitrary delay between them that is not related to the actual frequency of the sine wave. So my plan is basically to periodically fire a trigger in the fpga software that resets a sine wave generator and directs its output to an analog output until the sine wave goes negative, at which point the analog output is set to 0 until the next trigger.
    Thanks

    Muchas gracias por responder steve.bm
    El problema que tengo es el siguiente, estoy desarrollando un proyecto en el cual uso los conversores DAC y ADC de la  tarjeta FPGA Spartan 3E para lo cual use como base el proyecto que esta subido por la NI que se encuentra en uno de los enlaces que me dejaste,( Lesson 8 - Linking Existing VHDL Code from WebPACK into LabVIEW FPGA) del mismo solo modifique para usar el ADC y el DAC mediante el cual adquiero una señal senosoidal y la tengo que reconstruir, el problema es que como uso un generador de señal de laboratorio al ingresar la frecuencia de muestreo para obtener una buena reconstruccion, la frecuencia se baja lo cual en el proyecto real no podra pasar ya que la frecuencia ya en proyecto final la adquiero de la red electrica publica pero ahora para pruebas estoy con un generador, la verdad no se que pasa porque tiene un retrazo la señal.....
    Te parece si te puedo dejar mi proyecto subido en enlace para que lo revices ??

  • In order to sample a 3 Hz sine wave, I have to scan it at 30 Hz.

    My setup is as follows:
    I have two PXI 6031E DAQ cards in a PXI 1000B chassis. Each DAQ card connects to a SCXI 1001 chassis. On the first SCXI chassis I have six SCXI 1102C modules and in the second SCXI chassis I have three SCXI 1102 modules. I set up two seperate scan lists. One for the first DAQ card and one for the second DAQ card. The actual scanning functions are placed in seperate threads. After I acquire the data, I move it to "shared memory." The display program reads the value from shared memory and plots the value. For simplicity I left the data as a short int and plotted it that way. If I connect a function generator to any channel I can read a clean wave only if my scan rate is 10
    times the function generator value. For example, if I want to read a 3Hz sine wave I have to set the scan rate on the DataAcq program to 30Hz and the update rate on the display program to 30Hz. Should I be able to read a 3Hz sine wave while scanning at 3Hz? Also, I am open to any recommendations in my code.
    Attachments:
    DataAcq.zip ‏6 KB
    Display.zip ‏5 KB

    What you have discovered is quite normal for acquiring data in the time domain. If you were only interested in the frequency domain, you could follow the Nyquist criteria and sample at a frequency at least twice your desired frequency (6 Hz). Since you wish to examine the data as a sine wave (to view and recognize), you need to sample the waveform at a rate of at least ten times the desired frequency. Hence, to plot and recognize a 3 Hz signal, you would need to sample at a rate of 30 Hz. This action allows ten actual data points per wave cycle.
    As a rule, I use 16 times "oversampling" for my application where I desire to manipulate the data in the time domain. Twenty times oversampling would be even better. It really depends upon the resolution you would like to
    see in your data.

  • Sampling a sine wave

    Hi everyone
    I am looking to sample a signal using labview.
    I have produced a signal using the "simulate signal" block with controls for amplitude, frequency etc, and have varified that it works.
    I want to sample this signal at regular intervals and store the data. Can anyone explain how to sample a signal in labview?
    I have looked at the following white paper but it dealt more with the concept of sampling, rather than a tutorial of how to implement it:
    http://www.ni.com/white-paper/3016/en/
    I also looked at the following, which again didn't actually provide a tutorial:
    http://www.ni.com/tutorial/3116/en/
    I couldn't find anything else in my search. If anyone can point me in the direction of a tutorial for sampling it would be much appreciated

    Those sampling techniques will then be utilised for sampling real signals on an NI DAQ device. The simulated signal is just to provide me with a learning tool to learn sampling techniques, i.e. acquiring amplitudes at regular intervals
    I just need any sample as an input to test the sampling mechanism
    Using an NI DAQ device there are no other 'sampling techniques'. If you look at the vi snippet below, you see that the DAQ vi outputs a sampled signal just like the generate waveform vi. You don't get to do any sampling yourself or use a 'sampling mechanism', just change the input parameters to the vi to tell it sample rate, etc.
    Therefore, I'm not quite sure what you are looking for (and obviously neither is GerdW who was actually trying to be helpful).
    If you are looking to observe what happens when you change the sample frequency for a given waveform (in order to experiment with aliasing, etc.) then you can take the given samples and 'downsample' using the Resample Waveform vi.
     

  • Please help simulation synchroniz​ing dual sin wave using PLL labVIEW

    Hello,
    Please I want a simulation based on Lab view for synchronizing generators, as we know that the generator will generate a sin wave.
    If anyone can help me with this idea the simulation can be done using to input sin waves and synchronized with each other using PLL (phase lock loop), note that the generators will be synchronized if the frequency, phase angle and voltages are equal ( synchronized). Please if somebody has simulation based on this idea to help me with it.
    THANK YOU A LOT.
    I will appreciate it.

    Iam new on LV. what i want a simulation to synchronize two generators, the two generators will generate sin waves this sin waves will be compared to achieve synchronization its better to use PLL but i have no idea where to use it in this such simulation.
    The below attachment will discuss more what i want but it it can be editted instead of using two generators from outside is to put to sin wave and prove that when this two sin wave are not equal so synchronization faild and vice versa.
    no need for the DAQ it can be replaced by an oscilscope to see the two sine waves that are synchronized, any one can help me by this simulation  i will bs very thankful for him.
    THANK YOU ANYWAY  
    Attachments:
    paralleling.jpg ‏145 KB

  • How to count the number of cycles in sine wave

    Hi,
    I am new to Labview.  I have labview 8.2 version and my dataacquisition is NIDAQPAD6015.  I could write a program to generate a sine wave of desired frequency through simulate signal. My question is how do i measure the number of cycles for this sine wave as soon as I run the program. Hope my question  is clear.
    Ravi Mokirala

    To find the offset (which in this case is the Y value midpoint around which the sine wave is symetrical):
    Capture more than one cycle.  Find the min and max values.  Subtract Min from Max and divide by 2.  Then subtract this result from the Max value (or add the result to the Min value).  This is the offset.
    To count the number of cycles where the offset is unknown, just use the first data point value as a reference.  If the next data point is more positive, then count the number of times that the first data point is repeated and the next data point is more positive.  Of course with DBL data type, you probably would not get the exact same value as the first data point, so you need to use In Range with a very tiny limit.  It all depends on your signal amplitude, frequency, and sampling rate.
    Example:  Lets say your first data point value is 0.5 and the 2nd point is 0.55.  You need to look for another value that is between 0.48 and 0.52.  Then read the very next data point value.  If it is greater than the previous value, add one to the cycle count.  If it is less than, you are at half a cycle, do not add to the count.
    - tbob
    Inventor of the WORM Global

  • PXI-board only returns perfect sine wave

    Hi, everyone!
    This is a strange one:
    Im peforming synchronized sampling from two boards; one is a PCI-6224 in my computer and the other a PXI-6229 located in our PXI-system. Being a rookie when it comes to labview, I was quite proud of myself for managing this all by myself. However, when i looked closer at a 10 sec test-record I noticed something peculiar. Although none of the 32 (differential) channels had inputs during the recording, the PXI-board returned 16 perfect 1 Hz sine waves with exactly the same amplitude as the measurement range. Attaching a signal to the terminal block didn't alter this. The PCI-board returns only weak 50 Hz (power network) noise, as expected. What is going on ??
    I'm using a PXI-1031 chassis together with a PXI-8184 controller connected to the PC with a network cable. I trigger the pxi-board by sending the PC-clock through a PFI-port and a physichal wire.
    regards, Einar

    As I said, I haven't used LabVIEW 8 all that much. It's a bit tricky: you'll have to make a new Project, add the PXI as a new Target, and the add the VI you're trying to run underneath the new target. The last time I was playing with this I also had to open some ports in the Windows XP firewall.
    If this is all a bit much for you, you might have a PXI controller that is configured to dual-boot both LabVIEW RT and Windows XP. If you reboot the controller in Windows XP mode, you can then access the PXI-6229 in the same way you currently access the PCI-6224... provided you don't mind copying the VIs over and hooking up a mouse, monitor, and keyboard to the PXI.
    Switching from LV RT to Windows XP is most easily done by selecting the appropriate option in the PXI's BIOS. Check your PXI controller's manual for details.

  • Generating a 6X Sine Wave using an absolute encoder

    How do I get an Analog Signal Generation Synchronized to six times the frequency of an absolute nine bit parallel encoders output with adjustable phase relation. I am using a PXI-6533, a PXI-6711 and have available a PXI-6070E.
    Now the long version of the problem. I have a 9-bit absolute encoder connected to a motor shaft (up to 420Hz). From the encoders 9-bit (0-511) parallel signal I need to create a synchronized 6X sine wave (up to 2500Hzwith an adjustable phase relation. Picture an electronic timing chain. For every cycle of the encoder, I need to produce six full sine wave cycles with a variable tuned phase shift. I have LabView 7 w/RT.
    I have tried to use the Update Clock (PFI5) to step through a buf
    fer but it seems to drop an update every so often. I also have tried to monitor the bit-0 line to determine freq. and scaled the update rate accordingly but the phase shifts all over the place. Does anyone have any ideas on the matter ? I would really appreciate it! Thanx….Phil

    Phil,
    Another different option to solve your application would be to use the new LabVIEW FPGA module and the 7831R reconfigurable I/O hardware. Using these tools you can configure the FPGA on the board to generate the sine wave based on the 9-bit parallel input. The most simple setup would be to have a lookup table in the FPGA that has a corresponding output value to each of the 512 possible input values. This 512 sample table would contain 6 cycles of a sine wave. Every time the parallel input changes the analog output value would be updated accordingly from the lookup table. This setup would also allow to easily add a phas
    e shift of the output by shifting the point in the lookup table you are reading by a known constant.
    Christian L
    NICS
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • 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.

Maybe you are looking for

  • Foreign trade- Sales Order was blocked for delivery

    Hi, We maintained legal regulation for a country  "X" and those settings working fine for foreign trade. But when the same material using for different country and plant, the system blocking sales order - In the export log - error message says no leg

  • Iphone 5 will not turn off

    on/off switch does not work Iphone5. Phone has been in a Otter Box 100% of the time. If out of warrinty you are out of luck. Have to buy a new phone. Why in the world can the chinese not make a better switch? This is so lame!!!!

  • Memory leak when loading .swf in AS3?

    Hi all, I've got a pretty big issue here that I can't understand. I've got a pretty simple app that just repeatedly loads and then unloads an .swf called test.swf (this loaded .swf contains nothing but a document class and a graphic - a circle. The d

  • Regarding date

    hi experts, i have a simple problem. i want to display one report. in this report, i want display date. Means, in one column, i want to display difference b/w dates. i took a one local variable. Problem: if dates are same, it doesn't display any thin

  • Trouble mirroring root pool onto larger disk

    Hi, I have Solaris 11 Express with a root pool installed on a 500 GB disk. I'd like to migrate it to a 2 TB disk. I've followed the instructions on the ZFS troubleshooting guide (http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guid