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

Similar Messages

  • 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

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

  • Convert sine wave to digital output

    Hi,
    I'm using pci-6251 and Labview 8.
    I have an input analog sine wave which I want to convert to an output  TTL pulse (with the same frequency). I also want to be able to control the width of the TTL pulse.
    Can anyone give me some advise?
    Thank you,
    Shafran

    Shafran,
    This KB should be a great starting point for your application. You can change the width of the pulse by changing the duty cycle.
    Can I Create a Digital Pulse Train That is Synchronized with My Analog Input Signal?
    http://digital.ni.com/public.nsf/allkb/67CCAAF13C8​617FC86256E01006C3D69?OpenDocument
    Regards,
    Chris Delvizis
    National Instruments

  • 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

  • USB-6009 Sine Wave

    Hi,
    I am new to LabView and am having some trouble. I need to input two sine waves into a USB-6009. I have a voltmeter that should read the output. Two of the problems that I have had thus far: I can only use "On Demand" in DAQ Assistant and even when I throw the DAQ Assistant into a while loop I still do not get a readout on my voltmeter. Any suggestions? Thanks for the help.

    That is confusing. You say you need to input 2 sine waves into a 6009 and that to me implies that you are doing a DAQmx Read. Then you say you have a voltmeter to read the output. That implies you are doing a DAQmx Write. If you are really doing a write from the 6009, then on demand is, of course your only choice. As the specs clearly indicate, the output of the 6009 is strictly software timed so you would need to pass a sine wave point by point and then you would have very little control over the frequency. And, again as the specs clearly state, the fastest output rate you could expect is 150Samples/sec.

  • Simultaneous analog output 1k sine wave and data acquisition

    Although many topics of simultaneous analog output and input can be found in NI Developer Zone, I have not found a case similar to my project. I'm trying to generate a 1kHz sine wave by using the analog output of NI DAQPad-6070E, and acquire one channel input signal simultaneously. I found most of the examples can not work properly above 100Hz. Any suggestions are welcome. Thank you.
    Jian

    I have sucessfully solve the problem when I observed the increase of
    scan backlog number. Simply increase the buffer size of AI/AO and you
    can make the 1kHz sine wave output and data acquired properly.
    On Tue, 3 Feb 2004 09:03:07 -0600 (CST), jujian wrote:
    >Although many topics of simultaneous analog output and input can be
    >found in NI Developer Zone, I have not found a case similar to my
    >project. I'm trying to generate a 1kHz sine wave by using the analog
    >output of NI DAQPad-6070E, and acquire one channel input signal
    >simultaneously. I found most of the examples can not work properly
    >above 100Hz. Any suggestions are welcome. Thank you.
    >
    >Jian

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

  • How to measure time difference between zero crossing of a sine wave and rise time of a pulse on a same graph?

    I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
    Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
    The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
    I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
    I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
    Cheers
    Awais 
    Message Edited by awais.h on 03-30-2010 11:20 PM
    Message Edited by awais.h on 03-30-2010 11:21 PM
    Solved!
    Go to Solution.

    Hi
    Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
    But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
    Here is what I get using that code.
    As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
    I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
    Here is the the code modified.
    As you can see, it wasn't that big of a modification and it still is your code.
    I will keep trying.
    Thanks for the help
    Attachments:
    FinalShockSpeed.vi ‏55 KB

  • Question on the result of using Wavelet transform on sine wave

    Dear all,
    I have apply the Wavelet transform on a 50Hz sine wave. The result is shown below. But I don't understand the result of Wavelet transform. Anyone can help me? Thanks.
    Victor

    You seem to have something against the FFT, yet continually compare other transforms to the "sweet spot" for the FFT, ie. sinusoidal and periodic functions.  Without trying to write a treatise on the subject (there are many fine books), a few observations.
    The primary purpose of any transform pair is to perform a rotation in function space, for the FFT we are familiar with the time domain and frequency domain.  The wavelet domain is not so simple.  The FFT is very effective for sinusoidal and periodic functions, ie. those that have no localization in the time domain.  If you have a sinusoidal input, the infinite signal in the time domain can be reduced to a pair of numbers (one if you take the power spectrum).  That is very efficient, other periodic signals can usually be approximated by a small number of terms.  
    Wavelets on the other hand are chosen to be localized in both the time domain and the wavelet domain.  If you look at a periodic signal like your sine wave, you see a mess, and to recreate the input signal you will need to keep an awful lot of the points around for the inverse transform.  You may be able to set the last 1/3 to zero, but that's it.  To see an effective application, you should be looking at localized functions, like an impulse.  Put an impulse into the wavelet transform and you get something that is still a bit complex, but pretty simple.  The FFT of an impulse contains components at all frequencies and the wavelet clearly wins in this case.  
    On paper, there is usually a clear choice, and the FFT almost always wins for spectral estimation.  On the other hand, if you are trying to compress "real world" data, for instance an image, then there is a choice to be made.  Standard JPEGs are FFT based, you take the FFT and try to keep just the largest frequency components.  As you probably notice, edge contrast usually suffers, especially at higher compression.  With wavelets, it is typical to have slightly better contrast leading to better preservation of details for a given compression.
    In short, my opinion is that transforms are useful when they simplify the problem.  Wavelets do not simplify the representation of a sine wave. 

  • How do I make a sine wave in illustrator?

    Hi,
    I started a thread earlier this evening but I think that I accidentally flagged it as "solved" or something like that (I'm new to this forum). So I'm trying this again. I want to know if there's a way of creating a sine wave in illustrator. I've managed to create a cosine wave by using the zig zag effect on a line and choosing "smooth". But I can't seem to find a good way to make a sine wave.
    This is the difference for anyone wondering:
    I want a sine wave just like the picture above.
    Thanks for the help!
    ekmanch

    ekmanch,
    As I (mis)understand it, to create a single full sine wave, you may:
    1) Create a horizontal line 2.5 times the length of the desired full sine wave (or you may adapt the length later);
    2) Effect>Distort & Transform>Zig Zag with 4 Ridges per segment and Smmoths Points and the desired height as the Size (or you may adapt later);
    3) Object>Expand Appearance;
    4) Object>Path>Add Anchor Points;
    5) With the Scissors Tool cut where the sine wave starts and ends;
    6) Ungroup if needed and delete the end bits (and adapt the length/height if needed).

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

  • Sine wave on startup

    I searched for this all over and can only find references to start up sounds like 5 beeps or breaking glass.
    A couple of times I have started up my PowerBook G4 to have it make a single mid-ranged sine wave sound for a second or so. Then it waits for a few seconds and makes the normal startup sound. Everything seems to be running fine, except that hard drive access has become pretty slow. I tried running repair disk and it did nothing. What does the sine wave sound signify? Like I said this has only happened a couple of times, and is the only unusual error I've gotten.
    Thank you,
    Andrew
    PowerBook G4 17"   Mac OS X (10.4.8)  

    sometimes slow drive access means failing hard drive.
    all kinds of noises could be made by failing drives also.

Maybe you are looking for

  • Questions in sound

    hi, i have actually got two questions... the first one is how can i make a download button for a file in flash? so that when the user presses it he can have the save as, open, etc.. options? the second question is concerning dynamic text. is there an

  • How to change the name of Magic Trackpad on OSX Mavericks?

    I purchased a 2nd hand trackpad and the previous owner changed the name to their name. I'd like to change the name on the trackpad. All the instructions I've found don't apply to OSX Mavericks.

  • Process blocked sales and distribution documents from the SAPoffice inbox

    Hi, I know VKM1/VKM3 can be used to release order. And SAP help shows we can process blocked sales and distribution documents from the SAPoffice inbox. Could anyone tell me how? I can use output type KRML to send a mail to SAPoffice inbox, but don't

  • Remittance advices

    Hello Friends, We have got one requirement. We need to send remittance advices through different output medium based on the vendor(Print, Fax, E-mail, EDI etc). How can we achieve this? Do we need to maintain any output condition records for these? I

  • XMII WebService shows error as - SOAP Service could not be loaded: null

    Dear Friends,    I'm doing the xMII <-> XI <-> RFC scenario with the reference of the blog: https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8703. [original link is broken] [original link is broken] [original link is broken] I just create an asy