FPGA sine wave generator

NI工程師你好
我在FPGA端使用sine wave generator
可是出來的波形卻不是一個完整的Sin波圖形
可以請工程師幫我解答一下嗎??
已解決!
轉到解決方案。
附件:
sin.png ‏10 KB
sin-1.png ‏13 KB

好吧,我認為問題可能是您使用的圖表上的FPGA。不幸的是,LabVIEW的通信方式,有時會導致與 FPGA圖表更新不當,因為他們目前沒有時間同步的時間在芯片上。我組建了一個簡單的應用程序,而不是傳輸分回的主機和波形似乎是正確的。讓我知道這是否有助於。
附件:
Sine.zip ‏317 KB

Similar Messages

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

  • Générer une implusion avec "Sine Wave Generator" en FPGA

    Bonjour,
    Content de vous rejoindre sur ce forum. Tout nouveau en Labview (pas très à l'aise avec certaines notions), je voudrai soliciter votre aide. En fait, je veux créer une impulsion de 100Hz avec la fonction " Sine Wave Generator" de FPGA. En simulation j'ai réussi mais dès que je compile en target il m'affiche ce message : "Top-level clock rate does not match rate for which the Sine Wave Generator VI was configured. Reconfigure the Sine Wave Generator or the top-level clock so that their rates match. You also might need to modify computed values for the frequency (cycles/tick) input."  
    Je change donc FPGA clock rate et je choisis 40MHz (la seule qu'il me propose). Mais dans ce cas, je me perds pour retouver mon impulsion (qui doit durer une période 0.01sec). J'ai essayé de jouer sur le nombre d'échantillons en changeant le nombre d'itérations de la boucle For afin de générer toujours une période ( pièces jointes)  mais ça marche pas!!!
    Pourriez vous m'aider à déchiffrer ce problème?
    Merci d'avance
    Pièces jointes :
    burst sine.png ‏372 KB
    burst sine_40MHz.png ‏336 KB

    Bonjour M2IM,
    En mode simulation, on utilise une fonctionnalité appelée "Interactive Execution" car l'exeuction/affichage ne peut être géré à une fréquence élévé (40 MHz dans le cas de la Top Level Clock par défaut).
    En mode FPGA target, la vitesse est plus élevé et donc uniquement certains points du sinus seront afficher mais le signal electrique lui sera bien un sinus.
    Je t'invite à regarder le lien ci-dessous qui reprend quasiment la problématique que tu rencontres:
    Generate a sine with LabView FPGA and connect it to an AOModule
    Bonne journée,
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Discrete sine wave generator

    im lookin for a way to build a simple discrete sinewave gen that can generate up to 100MHz or more. Does a pll helps, can i use a crystal oscillator to generate the sinewave or even clock generator? pls reply mi asap. Thanks!

    Hello,
    This forum is for questions pertaining to the National Instruments product "Measure for Windows". I think you would reach a better audience for your question if you posted in one of the "Measurement Hardware" forums.
    Good luck, and have a nice day.
    Darren
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Sin wave generation for R series FPGA

    Dear All,
    I am generating sin Wave with (FPGA Sin Wave Generation Express vi) from Rseries FPGA Target.Frequency range is from 1500Hz to 3000Hz.Frequency and Amplitude parameters are coming from Host .Wave is going to an AO.The wave is not displaying in my Host with the set parameters as required.
    What am I doing wrong??
    Certified LabVIEW Architect
    Certified TestStand Developer

    Hi,
    I am using NI 9263 4x AO.the problem was with the FPGA Express vi Parameters used the example sin wave Generation from the FPGA fundamental folder and modified the Host parameters to meet our requirement and it worked fine.
    Thanks
    Certified LabVIEW Architect
    Certified TestStand Developer

  • How do I Fix DDS Generated Sine Wave That Produces a Periodic Square Wave?

    Hello,
    I'm an undergraduate researcher with almost no experience dealing with FPGA semantics and other National Instruments hardware in general.  Part of my project revolves around creating a sine wave signal via the FPGA on an sbRIO-9632 that is output via the board's analog I/O pins, and I found it convenient to adapt the code provided by the National Instruments tutorials (http://zone.ni.com/devzone/cda/epd/p/id/6066) to have it run on an sbRIO FPGA.  The problem I'm encountering right now is that the actual output I'm seeing is a square wave as opposed to the smooth sine wave that was expected, and I've exhausted all my ideas on possible ways to debug this issue.  Can anyone please give me feedback if they've seen this problem before or offer other suggestions on fixing this?
    I'm currently running LabVIEW 2009 with the appropriate real-time and FPGA modules on a 64-bit Windows 7 machine.  Again, the hardware is an sbRIO-9632 complete with analog I/O.  I appreciate it everyone!

    I am also having this issue and have not been able to find a solution in the forums. I am somewhat of a rookie so pardon me if I seem ignorant in any way. I am working on a graduate project where I need to produce some sine waves and I am getting more of a square wave when I output it and measure on the scope. The program I am running is quite simple at the moment to attempt to discover any errors by process of elimination. I have the sine wave generator in a while loop outputting to an AO port. I am using the cRIO 9022 with the 9269 AO module. I will attach screen shots of my code and my oscope image
    Attachments:
    sine wave.jpg ‏76 KB
    code for project.PNG ‏169 KB

  • Synchronizing 2 sine waves

    I'm new to Labview and NI-FGEN so things are taking a bit longer than i think they should, the problem is im trying to synchronize sine waves from 2 PXI 5421 cards.
    what im fundamentally trying to do is have a slide bar and at one end of the bar one sig gen is at 5V and the other sig gen at 0.1V and when you slide it to the middle the amplitudes are both at 2.5v and at the other end of the scale the first siggen is at 0.1V and the second 5V.
    i can get this bit to work but when i connect the sig gens to a scope one signal is drifting.
    on another note if any one knows an easier way of creating the signals, I've "butchered" some examples. So there's probably loads of stuff that I don't need inthere.
    Attachments:
    test sine wave generator.vi ‏45 KB

    I do not have the FGEN VIs so my comments are general rather than specific.
    1. Unless the frequencies are EXACTLY the same, the signals will drift relative to one another. There are at least two frequencies involved for each generator, (a) the user-specified signal frequency and (b) the D/A clock frequency. Your front panel has two controls for frequency. If they are set the same, then the nominal signal frequencies will be the same. It is important to be very careful with fractional numbers because of the way they are represented in binary in the computer.  The clock frequencies will be nominally the same. Many devices use quartz crystal oscillators which have a frequency tolerance of +/-100 ppm (parts per million).  While 100 ppm is a small fraction, two signals gnereated by clocks which differ by that much will drift.
    Fixes: (a) Use only one frequency knob on the front panel and feed the value to both FGEN modules.
    (b) Use the same clock for both modules. I do not know whether these devices have a connection for an external clock. If they do not, you will never get perfect synchronization. Somewhere you will need to configure subVIs to tell the modules what clock to use.
    2. The Amplitude slider will be read only once at the beginning of your program. That value will be used throughout the run. Any changes made later will be ignored. This is due to LabVIEW's dataflow paradigm.
    Fix: The terminal needs to be indside a loop. Better fix: Learn about the Producer/Consumer (Events) Design Pattern. This will have a parallel loop with an event structure to handle the User Interface, in particular, the changes in the slider. It will send the new values to the FGEN loops via queues.
    3. Same as 2 for Frequency. 
    Lynn

  • Unable to generate sine wave

    Hello everyone!
    I am currently working on my Bachelor project at a company. i am stuck with a problem.
    I have designed a labview program for vibration test system. I have used cRIO 9076 as the controller with NI 9263(as D/A) and NI 9234(as A/D).
    The loop works as follows. the input is given from the labview program. it is then sent to the cRIO. the output of CRIO(that is output from NI 9263) is given to the amplifier. the vibration shaker vibrates based on the input from aamplifier. then the accelerometer detects the vibration and sends it to the NI 9234 and loop repeats iteratively. since i have designed a sweep sine vibration system, the output of cRIO is a square wave. it should be sine wave.
    the probelm is i am getting a square wave as output from my NI 9263 which should be a sine wave output. I have two subVI where i use nominal to binary convertor(for NI 9234) and binary to nominal (for NI 9263) as calibration mechanism. 
    the question is where have i went wrong? what should I do to get a sine wave? 
    PS: on searching NI i found out some formulas (to generate sine wave) and designed a FPGA and LabVIEW program to generate a simple sine wave and got a sine wave. if that formulas is to be included where should i include that?
    Thanks in advance.
    Regards,
    Vishal.

    Without seeing your current code, there is no way we can even uess as to why you are creating a square wave instead of a sine wave.

  • 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

  • FPGA sine generator

    NI 工程師您好: FPGA Sine Generator中的 Look-Up table size 是指什麼?    如果While loop的迴圈速度是1000us,此時FPGA Sine Generator的Frequency設定為10Hz,那輸出的sine wave會是10Hz嗎?    謝謝。

    Hi, wwc
    在LabVIEW視窗內按Ctrl+H可以開啟說明視窗,而由說明視窗可以知道Table size的意思,請見下圖
    以上圖來說,這個Sin generator產生1024點的10KHz的sin波的DATA
    所以如果要正確輸出10KHz的sin波,您的輸出頻率要注意是否會影響輸出波形的頻率
    希望以上訊息能夠解答您的問題, 若還是有疑問, 再請您回文,
    若是覺得問題有解決而且答案還滿意, 也請您勾選 已解決 的選項以及惠賜一個 獎勵 ( Kudos )囉!
    謝謝!NI應用工程部
    AAron

  • How can i do a sine wave with High Throughput Sine for fpga?

    I try to do a sine wave looking the examples but i can't. I have a sbRio 9606. 
    I need to do a sine wave with high throughput block. In my exercise i have 2 inputs (amplitude and frecuency) and i have to look the output (sinewave)
    I need help!!

    Hi pablosan,
    If I understood correctly, you want to generate a sine wave with a high throughput block in Labview FPGA.
    I'm afraid you won't e able to do this, as these blocks are specifically designed for other FPGA targets with better features for high performance. So instead of using the example named "Sine and Cosine.lvproj" under High Throughput examples, you can use the "Sine Wave.lvproj" under Signal Generation and Processing examples, which is more adequate to your Single-Board RIO.
    Regards.

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

  • Help needed with generating a sine wave with NI-5640R card

    Hi there,
    I have created a simple programe using the 5640R card, and i am attaching the programe to this question. Using a "sine generation" function/block i am generating a sine wave and outputting to one of the o/p ports and then i am connecting that o/p port to one of the i/p ports using a cable. Then i am plotting what ever i have recieved through the i/p port (this has to be same as what is generated using "sine generator" ). The graph shows that i am not receiving aything from the i/p port, but when i plot the o/p of the "sine generator", i see that the sine generator is generating the sine wave. Please refer to the attached figure and please tell me what mistake i have made in this simple programe.
    Thanks,
    Sandeep.
    Message Edited by sandeep palreddy on 07-08-2007 12:46 PM
    Sandeep Palreddy, Graduate Research Assistance
    The Microwave Remote Sensing Laboratory (MIRSL)
    University of Massachusetts
    151 Holdsworth Way
    Amherst MA 01003-9284
    Attachments:
    figure.doc ‏27 KB
    figure.doc ‏27 KB

    Hi sandeep
    This small segment of code will not work on the NI PCI-5640R.  This module does not support running the FPGA Vis directly.  A Host VI must be run that calls to the FPGA Vis.
    I suggest that you look at the ni5640R Analog Input and Output example that is installed by the NI PCI-5640R software. 
    Jerry
    PS: Make sure that you are using the NI PCI-5640R software version 1.1.

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

  • FPGA wave generator precision

    Hello,
    I am trying to implement a FPGA project that requires signal frequency precision levels of about 1 mHz.  Due to the data types in the project, I seem to be having difficulty adjusting the frequencies of the Labview FPGA sine and square wave generators by 1 mHz; the specified frequencies (for example, 999.998 Hz) get binned to the closest available number (for example, 999.996 Hz).  I would like to change frequencies by only 1 mHz.  Is this possible with an FPGA project?  Any help would be much appreciated.

    did you check out http://zone.ni.com/devzone/cda/epd/p/id/6066
    notice figure 9 for computation of accumulator increment.  how are you trying to solve it?  what hardware?
    Stu McFarlane
    Viewpoint Systems, Inc.

Maybe you are looking for

  • Is there a way to install an SSD hard drive on a 2011 iMac without voiding the warranty?

    I purchased an iMac last October and my line of work demands extensive use of After Effects and Final Cut Pro. My iMac is fitted with the standard 1TB SATA hard drive, and lately I considered installing an SSD drive as I have been experiencing lags.

  • Calucation of Tax Amount in FB70

    Hi Guru's, Here Tax Procedure is TAXINN in which I have maintain Tax Code V9 as 14.42% (EXCISE+CESS) + 12.5% (VAT) in FV11. So while doing MIRO I select V9 Tax code then automatically Tax amount is calculated. My question is can same can done in FB60

  • Computer not recognizing my built in iSight

    my computer is not recognizing its camera. I have tried restarting, forcing restart, and holding keys that apple care has previously told me to hold. I checked in my system profile and it does not even show my build in isight. Does anyone have a tric

  • Quantity of pages of a specific size in a Document?

    Is there anyway to count the pages per their sizes? If my document has both A3 and A4 pages sizes, can I know how many of each there are in the document?

  • Is there an issue with my iPhone 4S battery?

    I've noticed that my phone's battery has been draining quite quickly recently. This morning at 3, it was fully charged and 9 hours later around noon time, it was down at 12 percent. Multi tasking was off along with location services. I'm not sure if