How to generate a continuous sine wave for a given amount of time

I am trying to output a continuous sine wave for a speaker, but I am having difficulty making it continuous rather than looping the signal for a given amount of time, which causes discontinuities. There is a VI in the Labview examples titles Continous Generation, but it produces a square wave. Is there a way to adapt this VI such that the amplitude and frequency can be used as inputs to create a sine wave?

I found a VI that ships with labview(7.0)called continuous sound output. the output of this is a sine wave or you can change it to whatever you want.
Sorry cannot help more
Joe
Joe.
"NOTHING IS EVER EASY"

Similar Messages

  • Continuing a loop for a set amount of time

    Hi,
    I'm am trying to alter a previously written program have run into a problem.
    The program is set up so that when the input exceeds a set level an output voltage to a buzzer is created; the buzzer continues as long as there is an input.  What I need it to do is to continue this output for a set amount of time.
    I've been searching the forum and found this straight forward solution from adamsjr.
    "The easiest way to do this is to use a two Tick Count functions. The first
    one is outside of a While loop, the second one is inside of the While loop.
    Wire the first one through a tunnel into the While loop, add on the appropriate
    ms (5*1000), wire the sum to one input of a compare function. Wire the
    other input of the compare function to the second Tick Count function. Exit
    the loop when the compare shows the second Tick count value is greater than
    the summed value."
    I've got placed the output subVI into a while loop and followed the above directions and this doesn't seem to work. I'm wondering if I would also have to include the input subVI into the loop or is there another possible solution
    Thanks ahead of time,
    Kristen

    Hi Kristen,
    You have the compare function implemented incorrectly.  You need to make sure that the first terminal of the "Greater than or equal" function connected to the output of the sum, and the second terminal to the tick count in the while loop.  The first terminal corresponds to x parameter and the second terminal is for the y parameter.  So if x is greater than or equal to y, then the loop will need to exit.
    You can see how long a subVI is taking if you put a flat sequence structure within your subVI around the entire subVI code.  The first frame would only have a tick count going into an indicator, the middle frame your normal code, and then the final frame would contain another tick count wired into another indicator.  Then you can subtract the second indicator value from the first and get hold long it took to execute the middle (core) of your code for that subVI.
    I highly suggest using the highlight execution and probes and other debugging techniques such as breakpoints to diagnose where the data is being held up.

  • 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 generating three phase sine wave simutiously with Vistual C++?

    Here I want to generate three phase sinewave at the same time with the phase angel 120 continiously. I can creat a task that contain 3 AOs, and generate 3 same sine wave at the same time. But I can not create 3 individual task which contains one AO channel, and write data to FIFO. Please tell me how to realize it?

    Hello, Rilee,
    Thank you very you very much. But I am still confused. The website I can not open. As you said, I shall create a data array to contain three phase data, for example, sinedata[750], sinedata[0:249] contains first AO, and sinedata[250:499] the second, and the rest is the third. then
    1. send the data for sinedata[0] to sinedata[249], to the board. with DAQmxWriteAnalogF64;
    2. send the data for sinedata[250] to sinedata[499], to the board. with DAQmxWriteAnalogF64;
    3. send the data for sinedata[500] to sinedata[749], to the board. with DAQmxWriteAnalogF64;
    and or so.
    Is all the above description right?
    Here I have several questions:
    1. When shall I send second section sample data? I think it shall be all the first data have been written to the board. And How can I know that all the first section data have been sent to the buffer?
    2. If I call DAQmxWriteAnalogF64 to write the second section data to buffer after the have finished first section data written, will this function affects the wave of the first section data?

  • I am trying to generate a 50kHz sine wave for ten cycles, then aquire this waveform and store it in a file, I am using a PCI-Mio 16E-4 board, has anyone done anything like this?

    I am trying to generate a 50kHz sine wave output on the DAQ card and then simultaneously recieve. I am using a PCI-Mio 16E-4 series board to do this. Has anyone done anything similar. I can generate a 50k wave no problem, and recieve one, but I can not get these vis to run together? Any suggestiosn

    Jrod, yes you should be able to do this, actually there are quite a few example programs come with LabVIEW that handles simultaneous analog input and output, I check the specs of the board you use, the board should be able to handle the sampling/generation rate, but make sure for 50KHz sine wave, you would sample at least twice as fast, preferably ten times the generation rate, then this puts the sampling of the board to thew limit.
    The program you can try is attached here, good luck with the application,
    XD Gao
    Applications Engineering,
    National Instruments
    Attachments:
    Simul_AIAO_Buffer(E-series).vi ‏104 KB

  • How do I make a program wait for a set amount of time?

    Basically, I want there to be some amount of lag after a repaint, so how do I do that? I want it to wait a fifth of a second, basically. Is there a quick way to do this?
    By the way, the program is not running on a timer, so I can't just have the timer stop.

    didn't see that:
    you need to use a thread
    public class Something implements Runnable
    Thread t;
    public Something()
    t = new Thread(this);
    t.start();
    public void run()
    while(true)
    //your stuff goes here
    try
    t.sleep(200);
    } catch(InterruptedException exc) { ; }

  • How can I get stable Sin wave through NI 9264 ?

    Dear all,
    I would like to generate 64 analog sin wave with frequency up to 20K Hz.
    Then I bought 4 NI9264:
    25 kS/s/ch simultaneous output
    Hot-swappable operation
    Spring terminal or D-SUB connectivity options
    250 Vrms isolation (spring terminal version)
    60 VDC isolation (D-SUB version)
    .The attached is my file for the generation. when I used Osciloscope to monitor the output, I could not get any stable output.
     Could I have the reasons and suggestions for my objective please?
    Thanks!
    Zhu_nuo
    Attachments:
    64 Channel Programmatic v2.vi ‏22 KB

    Hi Zhuming,
    The VI above only provides waveform information for a single channel. In order to output data across all 64 channels in the task, we can make use of a For Loop to build an array of waveform information for each channel. In the example below, I've made use of an Auto-Indexing For Loop in order to build up a waveform output array of 64 elements. I've wired this to an NI-DAQmx Analog 1D Wfm Write VI; the 1D array's elements represents each channel in the group of selected channels for generation.
    An important thing to note is that the NI 9264 16 channel analogue output modules have a maximum sample rate of 25 kS/s/ch. This means that each channel is capable of writing 25kS/s simultaneously.
    To reliably generate a signal, we generally need to have it comprised of around 5 to 10 points of data. This allows us to represent the signal to a good degree of accuracy. For example, if I wanted to reliably output a 1Hz Sine Wave, I would need to break the 1Hz wave into ten separate points and then output them at a rate of 10Hz. In terms of the NI 9264, the maximum frequency content (Two points of information) that can be generated is 25kHz/2 = 12.5kHz wave. The maximum clear wave frequency that we could produce with the 9264 (A wave built up of ten points) is 2.5kHz simultaneously across each channel. This is all to do with Nyquist's Theorem. This should explain why the frequency appeared to drop.
    Out of interest, how are you measuring these output frequencies?
    Kind Regards,
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

  • How to Generate a complex smart form for the Sales Order different pages h

    How to Generate a complex smart form for the Sales Order different pages has different page Layouts  explain me?

    in print program in interface when calling the form there should be some option to tell it to make a NEW spool everytime.
    I have it in mind for sap-script it is ITCPO-TDNEWID. Dont have it in mind for SAMRTFORMS but still it should work somehow similar.

  • How to get, write the sin wave frequency

    hey,
    How can I get the sin wave frequency from sin wave?- on the diagram. Problem is about saved this parametr to the fille. I have just only last one. I would like to have fequency adequate to the Im and Re  (Im, Re: parametrs witch are saved correctly) 
    Best regards,
    Marek

    Your program will not work because you because many of the functions you use must have timing information. And that information is not included by you as programmer. You have just included some functionality without reflecting over what these functions do and what they need as input. A programmer must have attention to details. You can not just throw out some VIs in a happy go lucky style. 
    Much of your problems is caused by the pesky dynamic data type. This is something that NI have glued ontop of Labview using very cheap glue. The whole concept is just flimflam and you should avoid using it.
    I can see you are a beginner. And that is OK we have all been there sometime. A very powerful function in Labview is the online help option. Then you start a new Labview session go to help in the toolbar. Then select "show Context Help" (ctrl+h). Then in doubt use the "detailed help option" in the online help window.
    I have included something to push you in the correct direction. As you can see many of red dots at the connector panes is gone. That is a good sign. Post again if you have more problems
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    some help.vi ‏11 KB

  • Continuous averaging for a certain amount of time

    Hi
    In my program I have to use a start button to continuously average a value for a certain amount of time(lets say 3s) and keep and show the average the value. The state of the start button should return to off mode after that 3 sec so if the user hit the start button again it reset the array and calculate the average again.
    Would you please help me with this program. I have attached pic of what I ahev done
    With this vi I can take data after hitting start for 3 sec but I have these problems:
    1- I don't know how to calculate average value when finish getting data after 3 sec
    2- I would like the start button back to off mode after 3 sec so if I click on the start button again it reset the array and calculate the average again.
    Would u plz help me with this vi?
    Attachments:
    1q.jpg ‏169 KB

    Use mean function to average an array. And wire your time has elapsed boolean to a case structure and reinitialise your boolean control to default in the true case.
    Create invoke node as below, just in case you dont know.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • C Programming: How can we get the filesystem name for a given file-path?

    C Programming: How can we get the filesystem name for a given file-path?
    Say I have a filepath=/mnt1/file1
    Using some OS API like stat, can I get the Filesystem /mnt ?
    Thanks in advance,
    -V

    Enter the command up to the point of entering the file path and add a space, then drag the file into the terminal window. It will fill out the path.
    If you need to go further into the contents of the Application package, you can continue with /Contents...
    Another way is to start typing and then hit Tab to auto-complete. It will stop where it can't determine the next letter.
    So, type /App tab and it will fill in /Applications. Type a / and start with the name of the app, then tab and it should complete. Continue till you have the correct path.
    Spaces will be replaced with \<space>, so, App Store would end up as /Applications/App\ Store.app

  • How can i find differnet output types for a given sales order ?

    hi all,
    answer my question please........?
    how can i find differnet output types for a given sales order ?

    hi
    check in NACO transaction if you have assigned access sequence to your output ytpes and if you have ticked checkbox "Access to output conditions" - otherwise it will not even try to access condition records.
    From help :
    Access to output conditions
    Indicates whether the system determines the output by searching for valid
    condition records.
    Procedure
    If you want the system to search condition records for the appropriate
    output, mark the field.
    Note
    If you leave the field blank and if you are processing sales, shipping,
    or billing documents, the system automatically determines output from
    information stored in the customer master record.
    regards
    ravish
    <b>plz reward points if helpful</b>

  • How to write data to the DAQ for a specified length of time while still reading the input data?

    Hello,
    I'm using labview 2012 and am trying to turn on a signal for a specified length of time in labview at the press of a button. The signal goes into an AO (PXI 6723) through my system, where the voltage gets divided by 2, the read in through the AI (PXI 6225). I want to write and read voltage constantly and then have a spike of voltage after pressing a button in LabView while still reading the voltage value for the specified amount of time.
    Parameters:
    constant voltage of 1 volt to Analog output (reading and writing) seen through a waveform chart.
    for 1 second, turn on 3 volts and see the response on the waveform chart.
    My specified delay time does not match the elapsed time. I am having difficulties doing this. I have attached the VI.
     ( I can't upload a functional VI since it shows "the contents of the attachment doesn't match its file type") How can I attach the VI?.
    Thanks!
    Eduardo

    Mike,
    Thank you for your reply! I greatly appreciate it. I currently don't have any DAQmx timing in my application. I tried using it and, without really understanding how it works nor how to manipulate it, the whole test end up taking a long time to change the values i.e. too slow.
    The DAQmx timing I used was the sample clock since it was for analog signals, but I don't really understand the buffer, what that means nor how to use it. inputting a rate time for it also made my test slower. The rate time is the samples per channel per second, but I'm not sure how to determine a number so that I am collecting the data I need and take into account aliasing.
    I know the PXI 6225 has the capability to read 250kS/s (which I am assuming it's kilosamples per second or 250,000 samples per second). I am using 32 differential channels. I have read that I have to divide the maximum sample rate by the number of channels, (250kS/s / channels) but I don't know if I should count the number of total channels (64) or differential channels(32). In other words, is the per-channel maximum rate:
    250,000/32 = 7,812.5 samples per channel per second, or
    250,000/64 =3,906.25 samples per channel per second
    Furthermore, If I know the number of samples per channel per second, how can I implement that knowledge to the DAQmx sample clock so that my sampling is as fast and as accurate as it can be?
    I attached an image of my DAQmx functions in my code, I merged all the stacked sequence structures in paint so you can see them.
    thanks for your help!
    Eduardo
    Attachments:
    DAQmx tasks.jpg ‏211 KB

  • How do I insert a pdf file (image) into a project as a picture-in-picture clip that will run for a specified amount of time?

    I want to insert a pdf created from a ppt slide into a FCP X project that will run as a PIP for a specified amount of time. I was successful in bringing the image into the project as a clip but the default for the image is one second. When I try to change duration of the clip, I am able to enter a new time length but the actual clip doesn't change.

    You select the PDF image in the timeline. You use Control-D and enter the new duration. What happens?

  • How to execute a frame of a flat sequence structure for a specified amount of time?

    Hello,
    I have a timed loop measuring a resistance value every 2 seconds. I would like to have this timed loop execute for a specified amount of time (e.g. 5 minutes). The timed loop itself is placed within a flat sequence structure so I am concerned that the measurement will be taken once and the next frame will begin to execute, without waiting 2 seconds for a successive reading (and not looping for, say, 5 minutes).
    In other words, is it possible to have a frame of a flat sequence structure execute for a specified amount of time before moving onto the next frame?
    Thanks for your assistance!
    JFK_Aero
    Solved!
    Go to Solution.

    All code in one sequence frame must complete before the next frame can execute.  So as long as your timed loop is setup correctly, the next frame cannot run until your 5 minutes is up (N = 5 minutes/2 seconds/measurement = 150 measurements).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for

  • WSRP Portlets - HTML elements renamed

    Moved from Webcenter Spaces. All, I have a JSR-168 portlet that I WSRP-ed using the wsrp-predeploy tool. I have this registered in Weblogic as a WSRP producer and added to Webcenter Spaces. What I notice is that when rendered on Spaces, the HTML elem

  • Error during ADF Security logout in 12c

    Hello, I'm in the process of migrating my application from 11.1.2.4 to 12.1.2.0, and one thing I've noticed is the following error message in the weblogic logs when logging out of ADF Security: <Error> <oracle.adf.share.http.HttpSessionScopeAdapter>

  • ITunes Jukebox won't shuffle through songs

    Remember in the good ol' days, when you could just click the spacebar at the iTunes library page, and it would shuffle through your songs and play something random for you? And you could click > and it'd shuffle again? Well, my iTunes has stopped doi

  • Header file in TMDS and Datafinder

    I want to write my acquisition info to header file in TDMS. My trial was seemed to be successful as you can see the attachment of TMDS viewer.png. But, some extra stuffs can be seen in DataFinder toolkit. (The searched folder contains only my custom

  • Universal Disk Format (UDF) into FCE4

    Does anyone know if you can or how to import Universal Disk Format (UDF) into FCE4